From 19f76f3dcd0dfb19826c6f5ea55a0d6c37e2bcd8 Mon Sep 17 00:00:00 2001 From: Zephyr Lykos Date: Wed, 14 Aug 2024 04:39:55 +0000 Subject: text_input: Implement input-method popups (#315) --- sway/tree/container.c | 3 +++ sway/tree/view.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'sway/tree') diff --git a/sway/tree/container.c b/sway/tree/container.c index 9b90b774..2de58a26 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -397,6 +397,9 @@ static bool surface_is_popup(struct wlr_surface *surface) { } surface = subsurface->parent; } + if (wlr_input_popup_surface_v2_try_from_wlr_surface(surface) != NULL) { + return true; + } struct wlr_xdg_surface *xdg_surface = wlr_xdg_surface_try_from_wlr_surface(surface); return xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP && xdg_surface->popup != NULL; diff --git a/sway/tree/view.c b/sway/tree/view.c index bd2268fd..4604f480 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1248,6 +1248,9 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) { if (wlr_layer_surface_v1_try_from_wlr_surface(wlr_surface) != NULL) { return NULL; } + if (wlr_input_popup_surface_v2_try_from_wlr_surface(wlr_surface) != NULL) { + return NULL; + } const char *role = wlr_surface->role ? wlr_surface->role->name : NULL; sway_log(SWAY_DEBUG, "Surface of unknown type (role %s): %p", -- cgit v1.2.3