aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-02 18:37:01 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-02 18:37:01 +0000
commit0e40e1c711134a600f7a410585a442edcf058db8 (patch)
tree1c29ef63aa57591161c6e3bd07290a8f9f8aa7eb
parentterm: add term_visual_focus_{in,out} (diff)
wayland: xdg-top-level-configure: call term_visual_focus_{in,out}
-rw-r--r--wayland.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wayland.c b/wayland.c
index 99e98fe2..7ab1ef2f 100644
--- a/wayland.c
+++ b/wayland.c
@@ -428,7 +428,11 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
struct wayland *wayl = data;
struct terminal *term = wayl_terminal_from_xdg_toplevel(wayl, xdg_toplevel);
- term->visual_focus = is_focused;
+ if (is_focused && !term->visual_focus)
+ term_visual_focus_in(term);
+ else if (!is_focused && term->visual_focus)
+ term_visual_focus_out(term);
+
render_resize(term, width, height);
}