aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-04-16 15:41:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-16 15:41:14 +0000
commit129deaffa82650a1383f5816aa46f4a78a73b2ed (patch)
treeb2b7e138757555893bbc8f99ed290edb92739c8f /terminal.c
parentchangelog: [csd].hide-when-maximized (diff)
wayland: optionally disable pointer input on subsurfaces
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.
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/terminal.c b/terminal.c
index b78279e4..87c14b58 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3008,10 +3008,6 @@ term_xcursor_update_for_seat(struct terminal *term, struct seat *seat)
: XCURSOR_LEFT_PTR;
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_BUTTON_MINIMIZE:
case TERM_SURF_BUTTON_MAXIMIZE:
@@ -3389,12 +3385,6 @@ term_surface_kind(const struct terminal *term, const struct wl_surface *surface)
{
if (likely(surface == term->window->surface))
return TERM_SURF_GRID;
- else if (surface == term->window->search.surf)
- return TERM_SURF_SEARCH;
- else if (surface == term->window->scrollback_indicator.surf)
- return TERM_SURF_SCROLLBACK_INDICATOR;
- else if (surface == term->window->render_timer.surf)
- return TERM_SURF_RENDER_TIMER;
else if (surface == term->window->csd.surface[CSD_SURF_TITLE].surf)
return TERM_SURF_TITLE;
else if (surface == term->window->csd.surface[CSD_SURF_LEFT].surf)
@@ -3411,13 +3401,8 @@ term_surface_kind(const struct terminal *term, const struct wl_surface *surface)
return TERM_SURF_BUTTON_MAXIMIZE;
else if (surface == term->window->csd.surface[CSD_SURF_CLOSE].surf)
return TERM_SURF_BUTTON_CLOSE;
- else {
- tll_foreach(term->window->urls, it) {
- if (surface == it->item.surf.surf)
- return TERM_SURF_JUMP_LABEL;
- }
+ else
return TERM_SURF_NONE;
- }
}
static bool