Hello,
Using a long subject line because I don't know what is the most appropriate cross-platform terminology and people might search for this under different names
This is feature request for a window hint, let's tentatively call it GLFW_MOUSE_PASSTHRU (exact naming to be determined). I am using it as part of the same work I mentioned in #1166 (GIF at the end of this post).
(Note, this is unrelated to transparency from a visual point of view, already discussed many times here: https://github.com/glfw/glfw/issues?utf8=%E2%9C%93&q=transparent)
Windows
The WndProc handler would do:
if (msg == WM_NCHITTEST)
return HTTRANSPARENT;
Mac
I think we can use the 'ignoresMouseEvents' property of 'NSWindow' (untested)
https://developer.apple.com/documentation/appkit/nswindow/1419354-ignoresmouseevents?language=objc
A Boolean value that indicates whether the window is transparent to mouse events.
Wayland
Possibly 'wl_surface::set_input_region' (untested)
https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface
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.
X11
I'm not sure how X11 works. For reference, Qt uses xcb_xfixes_create_region()+xcb_xfixes_set_window_shape_region_checked:
https://git.merproject.org/mer-core/qtbase/blob/master/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp#L1151
Context (gif): I am dragging a glfw window (that is right under my mouse cursor) and need to detect the window under so I can drop into them. Similarly to #1166 I can provide a rough (but usable) approximation on client-side by using the desktop size/position of all my windows, but of course this would bypass the window manager and ignore the proper z-order of windows (including windows from foreign application).
EDIT To clarify, at the moment I am testing this by using win32-specific code and installing a WndProc hook.

The naming and my use case are a little tricky because I toggle this feature on an existing GLFW window, and right now I still receive the currently captured mouse position for that window, which is ideal and desirable in my use case, and I think more flexible. This is why I didn't suggest a name like GLFW_IGNORE_MOUSE_INPUTS, because both CursorPosCallback and glfwGetCursorPos() still work fine.
Thanks for your consideration,
Omar
Hello,
Is there any word on this? I think the idea is great and would love to see it in GLFW.
would like to see something in that way too, having the issue that i need to create an overlay above some other application window on linux but still want to click stuff behind the overlay
This feature has been added as GLFW_MOUSE_PASSTHROUGH with #1568 by @rokups and will be included in 3.4.
Most helpful comment
This feature has been added as
GLFW_MOUSE_PASSTHROUGHwith #1568 by @rokups and will be included in 3.4.