diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index d74d6252..50694518 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -308,7 +308,7 @@ static void positioner_place_window(wlc_handle handle) { | |||
308 | /* default */ | 308 | /* default */ |
309 | } else { | 309 | } else { |
310 | geo.origin.x -= geo.size.w / 2; | 310 | geo.origin.x -= geo.size.w / 2; |
311 | } | 311 | } |
312 | 312 | ||
313 | sway_log(L_DEBUG, "xdg-positioner: placing window %" PRIuPTR " " | 313 | sway_log(L_DEBUG, "xdg-positioner: placing window %" PRIuPTR " " |
314 | "sized (%u,%u) offset by (%d,%d), " | 314 | "sized (%u,%u) offset by (%d,%d), " |
@@ -603,10 +603,13 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s | |||
603 | sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle); | 603 | sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle); |
604 | arrange_windows(c->parent, -1, -1); | 604 | arrange_windows(c->parent, -1, -1); |
605 | // Set it as focused window for that workspace if its going fullscreen | 605 | // Set it as focused window for that workspace if its going fullscreen |
606 | swayc_t *ws = swayc_parent_by_type(c, C_WORKSPACE); | ||
606 | if (toggle) { | 607 | if (toggle) { |
607 | swayc_t *ws = swayc_parent_by_type(c, C_WORKSPACE); | ||
608 | // Set ws focus to c | 608 | // Set ws focus to c |
609 | set_focused_container_for(ws, c); | 609 | set_focused_container_for(ws, c); |
610 | ws->fullscreen = c; | ||
611 | } else { | ||
612 | ws->fullscreen = NULL; | ||
610 | } | 613 | } |
611 | } | 614 | } |
612 | break; | 615 | break; |