summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-03-02 19:00:21 +0800
committerPo Lu <luangruo@yahoo.com>2022-03-02 19:02:14 +0800
commit68e293c81d8ef687500969461067dc774353968f (patch)
treef44b99fa8f4da204e4f590040b5049a0aa947505 /src/termhooks.h
parent6d78321ce824ede11ab04d976d46487bcd191cab (diff)
downloademacs-68e293c81d8ef687500969461067dc774353968f.tar.gz
Fix reporting of imaginary key prefixes on toolkit tool and menu bars
* src/keyboard.c (make_lispy_position): Set imaginary prefix if the terminal says what widget the position is on top of. * src/termhooks.h (struct terminal): New field `toolkit_position_hook'. * src/xterm.c (x_toolkit_position): New function. (x_create_terminal): Register hook.
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 b7696fed4f8..8fb4837ee57 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -831,6 +831,13 @@ struct terminal
frames on the terminal when it calls this hook, so infinite
recursion is prevented. */
void (*delete_terminal_hook) (struct terminal *);
+
+ /* Called to determine whether a position is on the toolkit tool bar
+ or menu bar. May be NULL. It should accept five arguments
+ FRAME, X, Y, MENU_BAR_P, TOOL_BAR_P, and store true into
+ `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 *);
} GCALIGNED_STRUCT;
INLINE bool