diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-19 07:14:03 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-19 07:14:03 -0400 |
commit | 8fb2e7e34e279a005a4d42e224f71f9b35ddf918 (patch) | |
tree | a04cc657974f755360c5102a88c908a5160f61cd /sway/focus.c | |
parent | ae367c5af496828cf326f55597db26fcbfefe6d0 (diff) | |
parent | c5a69828934bf07db9062bd5f24bb2ff94b45b4a (diff) |
Merge pull request #79 from taiyu-len/master
fixed floating_modifier related things
Diffstat (limited to 'sway/focus.c')
-rw-r--r-- | sway/focus.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c index 1f17dfc9..7023d37d 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -146,6 +146,9 @@ void set_focused_container(swayc_t *c) { // update container focus from here to root, making necessary changes along // the way swayc_t *p = c; + if (p->type != C_OUTPUT && p->type != C_ROOT) { + p->is_focused = true; + } while (p != &root_container) { update_focus(p); p = p->parent; @@ -168,8 +171,11 @@ void set_focused_container(swayc_t *c) { } // activate current focus if (p->type == C_VIEW) { - wlc_view_focus(p->handle); wlc_view_set_state(p->handle, WLC_BIT_ACTIVATED, true); + //set focus if view_focus is unlocked + if (!locked_view_focus) { + wlc_view_focus(p->handle); + } } } } |