From d500dbd4e2c97c83f82ee36739f70cce713ee9bc Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 12 Jul 2024 12:12:02 -0500 Subject: [PATCH] xwm: Fix input regions commit 0f99e081c43a0f60cfc03463e6a491424a2bb7c4 broke xwayland client input regions. The xwayland window manager sets input regions in the pending state without going through the function that sets the WESTON_SURFACE_DIRTY_INPUT bit. Just add the dirty bit to the xwm code. Also, fix the whitespace error the same patch introduced. fixes 0f99e081c43a0f60cfc03463e6a491424a2bb7c4 Signed-off-by: Derek Foreman --- libweston/compositor.c | 2 +- xwayland/window-manager.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 987f156a..289db0b8 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -4801,7 +4801,7 @@ weston_surface_commit_state(struct weston_surface *surface, /* wl_surface.set_input_region */ if (status & (WESTON_SURFACE_DIRTY_SIZE | WESTON_SURFACE_DIRTY_INPUT)) { pixman_region32_intersect_rect(&surface->input, &state->input, - 0, 0, + 0, 0, surface->width, surface->height); } diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 5a53abfb..d4036752 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -1442,6 +1442,7 @@ weston_wm_window_set_pending_state(struct weston_wm_window *window) pixman_region32_fini(&window->surface->pending.input); pixman_region32_init_rect(&window->surface->pending.input, input_x, input_y, input_w, input_h); + window->surface->pending.status |= WESTON_SURFACE_DIRTY_INPUT; xwayland_interface->set_window_geometry(window->shsurf, input_x, input_y,