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. --- input.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index ba45a59d..29ac80ae 100644 --- a/input.c +++ b/input.c @@ -1904,10 +1904,6 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, break; } - case TERM_SURF_SEARCH: - case TERM_SURF_SCROLLBACK_INDICATOR: - case TERM_SURF_RENDER_TIMER: - case TERM_SURF_JUMP_LABEL: case TERM_SURF_TITLE: case TERM_SURF_BORDER_LEFT: case TERM_SURF_BORDER_RIGHT: @@ -1993,10 +1989,6 @@ wl_pointer_leave(void *data, struct wl_pointer *wl_pointer, break; case TERM_SURF_NONE: - case TERM_SURF_SEARCH: - case TERM_SURF_SCROLLBACK_INDICATOR: - case TERM_SURF_RENDER_TIMER: - case TERM_SURF_JUMP_LABEL: case TERM_SURF_TITLE: case TERM_SURF_BORDER_LEFT: case TERM_SURF_BORDER_RIGHT: @@ -2044,10 +2036,6 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer, switch (surf_kind) { case TERM_SURF_NONE: - case TERM_SURF_SEARCH: - case TERM_SURF_SCROLLBACK_INDICATOR: - case TERM_SURF_RENDER_TIMER: - case TERM_SURF_JUMP_LABEL: case TERM_SURF_BUTTON_MINIMIZE: case TERM_SURF_BUTTON_MAXIMIZE: case TERM_SURF_BUTTON_CLOSE: @@ -2463,12 +2451,6 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, term_shutdown(term); break; - case TERM_SURF_SEARCH: - case TERM_SURF_SCROLLBACK_INDICATOR: - case TERM_SURF_RENDER_TIMER: - case TERM_SURF_JUMP_LABEL: - break; - case TERM_SURF_GRID: { search_cancel(term); urls_reset(term); -- cgit v1.3