summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-06-24 10:57:35 +0800
committerPo Lu <luangruo@yahoo.com>2022-06-24 10:57:35 +0800
commitbf5c75465f37ad45934f58287660f18ec0bcf7bf (patch)
tree837922f74e8e90f3f357169b72d77842be189d5c /src/termhooks.h
parentab203b0ce26f4989c7fc80185207c6c40bbfa5fe (diff)
downloademacs-bf5c75465f37ad45934f58287660f18ec0bcf7bf.tar.gz
Improve grabbing detection with multiple master devices (MPX)
* src/frame.c (gui_mouse_grabbed): Respect any_grab_hook. * src/termhooks.h (GCALIGNED_STRUCT): New hook `any_grab_hook'. * src/xterm.c (x_have_any_grab): New function. (x_create_terminal): Define hook on XI2 builds.
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index d7190e77362..a1e3e2cde9a 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -877,6 +877,13 @@ struct terminal
MENU_BAR_P if X and Y are in FRAME's toolkit menu bar, and true
into TOOL_BAR_P if X and Y are in FRAME's toolkit tool bar. */
void (*toolkit_position_hook) (struct frame *, int, int, bool *, bool *);
+
+#ifdef HAVE_WINDOW_SYSTEM
+ /* Called to determine if the mouse is grabbed on the given display.
+ If either dpyinfo->grabbed or this returns true, then the display
+ will be considered as grabbed. */
+ bool (*any_grab_hook) (Display_Info *);
+#endif
} GCALIGNED_STRUCT;
INLINE bool