summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-03-18 18:04:02 -0400
committerLibravatar GitHub <noreply@github.com>2017-03-18 18:04:02 -0400
commit0fa8b5abfbddbdacfb9330167ae09bd4027f9654 (patch)
tree0d242ebd0ca87cba9b338d769ec30b6e1cdc4729
parentMerge pull request #1125 from zandrmartin/remove-unnecessary-todo (diff)
parentprevent fullscreen focus thievery (diff)
downloadsway-0fa8b5abfbddbdacfb9330167ae09bd4027f9654.tar.gz
sway-0fa8b5abfbddbdacfb9330167ae09bd4027f9654.tar.zst
sway-0fa8b5abfbddbdacfb9330167ae09bd4027f9654.zip
Merge pull request #1126 from zandrmartin/prevent-fullscreen-focus-stealing
prevent fullscreen focus thievery
-rw-r--r--sway/handlers.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 5862c2b9..b61c0a19 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -310,7 +310,7 @@ static void positioner_place_window(wlc_handle handle) {
310 /* default */ 310 /* default */
311 } else { 311 } else {
312 geo.origin.x -= geo.size.w / 2; 312 geo.origin.x -= geo.size.w / 2;
313 } 313 }
314 314
315 sway_log(L_DEBUG, "xdg-positioner: placing window %" PRIuPTR " " 315 sway_log(L_DEBUG, "xdg-positioner: placing window %" PRIuPTR " "
316 "sized (%u,%u) offset by (%d,%d), " 316 "sized (%u,%u) offset by (%d,%d), "
@@ -605,10 +605,13 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s
605 sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle); 605 sway_log(L_DEBUG, "setting view %" PRIuPTR " %s, fullscreen %d", view, c->name, toggle);
606 arrange_windows(c->parent, -1, -1); 606 arrange_windows(c->parent, -1, -1);
607 // Set it as focused window for that workspace if its going fullscreen 607 // Set it as focused window for that workspace if its going fullscreen
608 swayc_t *ws = swayc_parent_by_type(c, C_WORKSPACE);
608 if (toggle) { 609 if (toggle) {
609 swayc_t *ws = swayc_parent_by_type(c, C_WORKSPACE);
610 // Set ws focus to c 610 // Set ws focus to c
611 set_focused_container_for(ws, c); 611 set_focused_container_for(ws, c);
612 ws->fullscreen = c;
613 } else {
614 ws->fullscreen = NULL;
612 } 615 }
613 } 616 }
614 break; 617 break;