summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-03-18 18:04:02 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-04-03 11:00:07 -0400
commitb64d608ddc343cf37d0b748e173fa4b5587c4817 (patch)
treeb207870b6fb3f9c56758571bb6fbd149fe1595c4
parentMerge pull request #1119 from oranenj/master (diff)
downloadsway-b64d608ddc343cf37d0b748e173fa4b5587c4817.tar.gz
sway-b64d608ddc343cf37d0b748e173fa4b5587c4817.tar.zst
sway-b64d608ddc343cf37d0b748e173fa4b5587c4817.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 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;