aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-04-19 12:50:53 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-04-19 12:50:53 +1000
commit7e38cc2e05f4a14a9e4043951b6fcc033cbb41c2 (patch)
tree7087600aab0e6c0d2391bd1ff74886d81a1f46ad
parent2acfbc519ef7940b620abef0de64ae79d1f50782 (diff)
arrange_windows(): Calculate workspace properties when fullscreen
-rw-r--r--sway/tree/layout.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 56d4e1d2..96d0c567 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -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;