From 129deaffa82650a1383f5816aa46f4a78a73b2ed Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 16 Apr 2022 17:41:14 +0200 Subject: wayland: optionally disable pointer input on subsurfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have a number of sub-surfaces for which we are *not* interrested in pointer (or touch) input. Up until now, we’ve manually dealt with these, by recognizing these surfaces in all pointer events, and ignoring them. But, lo and behold, there are better ways of doing this. By clearing the subsurface’s input region, the compositor will do this for us - when a pointer is outside a surface’s input region, the event is passed to the next surface underneath it. This is exactly what we want! Do this for all subsurfaces, *except* the CSDs. --- render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'render.c') diff --git a/render.c b/render.c index 7ad8704d..d3cc2ab9 100644 --- a/render.c +++ b/render.c @@ -2159,7 +2159,9 @@ render_scrollback_position(struct terminal *term) } if (win->scrollback_indicator.surf == NULL) { - if (!wayl_win_subsurface_new(win, &win->scrollback_indicator)) { + if (!wayl_win_subsurface_new( + win, &win->scrollback_indicator, false)) + { LOG_ERR("failed to create scrollback indicator surface"); return; } -- cgit v1.3