Commit 7e498521 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

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.
parent 4c9c991f
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment