mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 16:36:26 +01:00
arrange_windows(): Calculate workspace properties when fullscreen
This commit is contained in:
parent
2acfbc519e
commit
7e38cc2e05
1 changed files with 5 additions and 9 deletions
|
@ -596,12 +596,6 @@ void arrange_windows(struct sway_container *container,
|
|||
container->name, container->width, container->height, container->x,
|
||||
container->y);
|
||||
|
||||
if (container->type == C_WORKSPACE
|
||||
&& container->sway_workspace->fullscreen) {
|
||||
view_configure(container->sway_workspace->fullscreen, 0, 0,
|
||||
container->parent->width, container->parent->height);
|
||||
}
|
||||
|
||||
double x = 0, y = 0;
|
||||
switch (container->type) {
|
||||
case C_ROOT:
|
||||
|
@ -628,9 +622,6 @@ void arrange_windows(struct sway_container *container,
|
|||
return;
|
||||
case C_WORKSPACE:
|
||||
{
|
||||
if (container->sway_workspace->fullscreen) {
|
||||
return;
|
||||
}
|
||||
struct sway_container *output =
|
||||
container_parent(container, C_OUTPUT);
|
||||
struct wlr_box *area = &output->sway_output->usable_area;
|
||||
|
@ -642,6 +633,11 @@ void arrange_windows(struct sway_container *container,
|
|||
container->y = y = area->y;
|
||||
wlr_log(L_DEBUG, "Arranging workspace '%s' at %f, %f",
|
||||
container->name, container->x, container->y);
|
||||
if (container->sway_workspace->fullscreen) {
|
||||
view_configure(container->sway_workspace->fullscreen, 0, 0,
|
||||
output->width, output->height);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// children are properly handled below
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue