Let pointer events pass through
Guillermo Rodriguez
guillerodriguez.dev at gmail.com
Mon Nov 18 12:37:08 UTC 2019
Hello,
I am writing a Wayland client that acts as an OSD "overlay" on top of
another application. This OSD overlay should not handle any pointer
events -- these should "pass through" and be handled by the
application below.
>From the docs, wwl_surface::set_input_region looked promising:
> Input events happening outside of this region will try the next surface in the server surface stack. The compositor ignores the parts of the input region that fall outside of the surface. [...] The initial value for an input region is infinite. That means the whole surface will accept input. Setting the pending input region has copy semantics, and the wl_region object can be destroyed immediately. A NULL wl_region causes the input region to be set to infinite.
I am trying this:
struct wl_region* region =
wl_compositor_create_region(_glfw.wl.compositor);
wl_surface_set_input_region(window->wl.surface, region);
wl_region_destroy(region);
However it doesn't seem to work -- pointer events do not seem to "pass through".
Same problem is also reported here: https://github.com/glfw/glfw/pull/1568
Is this approach correct? Any hints on how to debug this?
Best regards,
Guillermo Rodriguez Garcia
guille.rodriguez at gmail.com
More information about the wayland-devel
mailing list