Alexandros Frantzis : winewayland.drv: Forward all client surface pointer events to parent.
Module: wine Branch: master Commit: 7e4985212b8efcc1d07e2ac4db469697e864c766 URL: https://gitlab.winehq.org/wine/wine/-/commit/7e4985212b8efcc1d07e2ac4db46969... Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com> Date: Tue Nov 7 16:18:38 2023 +0200 winewayland.drv: Forward all client surface pointer events to parent. Set an empty input region for the client area surface, so that the compositor forwards input events to the main/parent surface instead. This simplifies input handling, since otherwise we would need to implement special handling of events on the client area surface and transform them accordingly. --- dlls/winewayland.drv/wayland_surface.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/winewayland.drv/wayland_surface.c b/dlls/winewayland.drv/wayland_surface.c index b83709c5a8a..5a808b3ac96 100644 --- a/dlls/winewayland.drv/wayland_surface.c +++ b/dlls/winewayland.drv/wayland_surface.c @@ -758,6 +758,8 @@ BOOL wayland_client_surface_release(struct wayland_client_surface *client) */ struct wayland_client_surface *wayland_surface_get_client(struct wayland_surface *surface) { + struct wl_region *empty_region; + if (surface->client) { InterlockedIncrement(&surface->client->ref); @@ -782,6 +784,16 @@ struct wayland_client_surface *wayland_surface_get_client(struct wayland_surface } wl_surface_set_user_data(surface->client->wl_surface, surface->hwnd); + /* Let parent handle all pointer events. */ + empty_region = wl_compositor_create_region(process_wayland.wl_compositor); + if (!empty_region) + { + ERR("Failed to create wl_region\n"); + goto err; + } + wl_surface_set_input_region(surface->client->wl_surface, empty_region); + wl_region_destroy(empty_region); + surface->client->wl_subsurface = wl_subcompositor_get_subsurface(process_wayland.wl_subcompositor, surface->client->wl_surface,
participants (1)
-
Alexandre Julliard