diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-03-30 07:41:13 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-03-30 07:41:13 -0400 |
commit | 4bf10d77713f5ea9fdc05c084a26a5eb1d5bc3c5 (patch) | |
tree | ac04166d4e75b4cf7617705e31214f73f2398655 /sway/focus.c | |
parent | Merge pull request #555 from mikkeloscar/mode-name-spaces (diff) | |
parent | Fix borders with floating windows (diff) | |
download | sway-4bf10d77713f5ea9fdc05c084a26a5eb1d5bc3c5.tar.gz sway-4bf10d77713f5ea9fdc05c084a26a5eb1d5bc3c5.tar.zst sway-4bf10d77713f5ea9fdc05c084a26a5eb1d5bc3c5.zip |
Merge pull request #551 from mikkeloscar/window-borders
Implement Window borders
Diffstat (limited to 'sway/focus.c')
-rw-r--r-- | sway/focus.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/focus.c b/sway/focus.c index 7f96eda7..0c9719b0 100644 --- a/sway/focus.c +++ b/sway/focus.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "config.h" | 7 | #include "config.h" |
8 | #include "input_state.h" | 8 | #include "input_state.h" |
9 | #include "ipc-server.h" | 9 | #include "ipc-server.h" |
10 | #include "border.h" | ||
10 | 11 | ||
11 | bool locked_container_focus = false; | 12 | bool locked_container_focus = false; |
12 | bool locked_view_focus = false; | 13 | bool locked_view_focus = false; |
@@ -28,6 +29,8 @@ static void update_focus(swayc_t *c) { | |||
28 | 29 | ||
29 | // Case where output changes | 30 | // Case where output changes |
30 | case C_OUTPUT: | 31 | case C_OUTPUT: |
32 | // update borders for views in prev | ||
33 | container_map(prev, map_update_view_border, NULL); | ||
31 | wlc_output_focus(c->handle); | 34 | wlc_output_focus(c->handle); |
32 | break; | 35 | break; |
33 | 36 | ||
@@ -130,6 +133,7 @@ bool set_focused_container(swayc_t *c) { | |||
130 | // unactivate previous focus | 133 | // unactivate previous focus |
131 | if (focused->type == C_VIEW) { | 134 | if (focused->type == C_VIEW) { |
132 | wlc_view_set_state(focused->handle, WLC_BIT_ACTIVATED, false); | 135 | wlc_view_set_state(focused->handle, WLC_BIT_ACTIVATED, false); |
136 | update_view_border(focused); | ||
133 | } | 137 | } |
134 | // activate current focus | 138 | // activate current focus |
135 | if (p->type == C_VIEW) { | 139 | if (p->type == C_VIEW) { |
@@ -137,6 +141,7 @@ bool set_focused_container(swayc_t *c) { | |||
137 | // set focus if view_focus is unlocked | 141 | // set focus if view_focus is unlocked |
138 | if (!locked_view_focus) { | 142 | if (!locked_view_focus) { |
139 | wlc_view_focus(p->handle); | 143 | wlc_view_focus(p->handle); |
144 | update_view_border(p); | ||
140 | } | 145 | } |
141 | } | 146 | } |
142 | } else if (p->type == C_WORKSPACE) { | 147 | } else if (p->type == C_WORKSPACE) { |