diff options
author | Po Lu <luangruo@yahoo.com> | 2022-03-07 21:36:25 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-03-07 21:36:25 +0800 |
commit | 418e5da5d308b4e440f28545eb139211066b48a4 (patch) | |
tree | 6061adb42a47040a10f8d36854f6e924c4202ac6 /oldXMenu/Activate.c | |
parent | 8a7df412a640c8b2334b78ec0ca872a6d11e8b0e (diff) | |
download | emacs-418e5da5d308b4e440f28545eb139211066b48a4.tar.gz emacs-418e5da5d308b4e440f28545eb139211066b48a4.tar.bz2 emacs-418e5da5d308b4e440f28545eb139211066b48a4.zip |
Correctly handle exposure in oldXMenu
* oldXMenu/Activate.c (XMenuActivate): Call set expose_func if
no pane was found.
(XMenuActivateSetExposeFunction): New function.
* oldXMenu/XMenu.h: New typedef `expose_func'. Update
prototypes.
* src/xmenu.c (x_menu_expose_event): New function.
(x_menu_show): Set expose event handler.
* src/xterm.c (x_dispatch_event): Make `static' only on GTK.
* src/xterm.h: Expose `x_dispatch_event' on no-toolkit builds.
Diffstat (limited to 'oldXMenu/Activate.c')
-rw-r--r-- | oldXMenu/Activate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c index 781c05bd026..e679c2ffed6 100644 --- a/oldXMenu/Activate.c +++ b/oldXMenu/Activate.c @@ -122,6 +122,7 @@ int x_menu_grab_keyboard = 1; static Wait_func wait_func; static void* wait_data; static Translate_func translate_func = NULL; +static Expose_func expose_func = NULL; void XMenuActivateSetWaitFunction (Wait_func func, void *data) @@ -136,6 +137,12 @@ XMenuActivateSetTranslateFunction (Translate_func func) translate_func = func; } +void +XMenuActivateSetExposeFunction (Expose_func func) +{ + expose_func = func; +} + int XMenuActivate( register Display *display, /* Display to put menu on. */ @@ -339,6 +346,9 @@ XMenuActivate( feq = feq_tmp; } else if (_XMEventHandler) (*_XMEventHandler)(&event); + + if (expose_func) + expose_func (&event); break; } if (event_xmp->activated) { |