Window::SetIgnoreMouseEvents():
- is a stub on Linux (
src/platform/linux/window_linux.cpp); an input shape (gdk_window_input_shape_combine_region with an empty region) would do it
- has no
forward option. Electron's setIgnoreMouseEvents(true, {forward: true}) still delivers mouse-move events while clicks pass through, so an overlay can detect hovering over its interactive parts and turn click-through off there. On macOS that's a tracking area or a global mouse monitor; on Windows, WS_EX_TRANSPARENT plus a low-level mouse hook or polling.
SetInputShape() (Linux-only so far) covers the "only these regions are clickable" case, and could be a better answer on macOS/Windows too.
Background:
Window::SetIgnoreMouseEvents():src/platform/linux/window_linux.cpp); an input shape (gdk_window_input_shape_combine_regionwith an empty region) would do itforwardoption. Electron'ssetIgnoreMouseEvents(true, {forward: true})still delivers mouse-move events while clicks pass through, so an overlay can detect hovering over its interactive parts and turn click-through off there. On macOS that's a tracking area or a global mouse monitor; on Windows,WS_EX_TRANSPARENTplus a low-level mouse hook or polling.SetInputShape()(Linux-only so far) covers the "only these regions are clickable" case, and could be a better answer on macOS/Windows too.Background: