diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-29 14:47:30 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-30 00:47:58 +0200 |
commit | 5a13cb0ed136906a4370235214601b0129548c49 (patch) | |
tree | 51dce6cdcb9bb1ffe27dcdc9a01ca9bda3a7c87a /sway/focus.c | |
parent | 3b05f92f76c3bd9400320844e485eb06e94772cd (diff) |
Implement borders
The borders are implemented as a surface/buffer attached to each view
which is sent to and rendered by wlc in the view_pre_render callback.
All the drawing logic is handled in sway/border.c and all the logic for
calculating the geometry of the border/view is handled in
`update_geometry` in sway/layout.c (same place as gaps are calculated).
Diffstat (limited to 'sway/focus.c')
-rw-r--r-- | sway/focus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/focus.c b/sway/focus.c index 7f96eda7..4cae3b47 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -7,6 +7,7 @@ #include "config.h" #include "input_state.h" #include "ipc-server.h" +#include "border.h" bool locked_container_focus = false; bool locked_view_focus = false; @@ -130,6 +131,7 @@ bool set_focused_container(swayc_t *c) { // unactivate previous focus if (focused->type == C_VIEW) { wlc_view_set_state(focused->handle, WLC_BIT_ACTIVATED, false); + update_view_border(focused); } // activate current focus if (p->type == C_VIEW) { @@ -137,6 +139,7 @@ bool set_focused_container(swayc_t *c) { // set focus if view_focus is unlocked if (!locked_view_focus) { wlc_view_focus(p->handle); + update_view_border(p); } } } else if (p->type == C_WORKSPACE) { |