diff options
author | oldosfan <luangruo@yahoo.com> | 2021-11-01 08:19:32 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2021-11-10 13:27:01 +0800 |
commit | 346cfc81247e6bf8e727a27b42f44f2389bd1269 (patch) | |
tree | 424eb046da6c0b2e2e75651226d2c613f6da640e /src/xmenu.c | |
parent | 68a2a3307d1703ac8abe4b54c8e1ef9dda677c12 (diff) | |
download | emacs-346cfc81247e6bf8e727a27b42f44f2389bd1269.tar.gz emacs-346cfc81247e6bf8e727a27b42f44f2389bd1269.tar.bz2 emacs-346cfc81247e6bf8e727a27b42f44f2389bd1269.zip |
Add support for event processing via XInput 2
* configure.ac: Add an option to use XInput 2 if available
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables
(EMACS_CFLAGS): Add Xinput CFLAGS
(LIBES): Add XInput libs
* src/xmenu.c (popup_activated_flag): Expose flag if XInput 2 is
available
* src/xfns.c (x_window): Set XInput 2 event mask
* src/xterm.c (x_detect_focus_change): Handle XInput 2 GenericEvents
(handle_one_xevent): Handle XInput 2 events
(x_term_init): Ask the server for XInput 2 support and set xkb_desc if
available
(x_delete_terminal): Free XKB kb desc if it exists, and free XI2
devices if they exist
(x_free_xi_devices, x_init_master_valuators): New functions
(x_get_scroll_valuator_delta): New function
(init_xterm): Don't tell GTK to only use Core Input when built with
XInput 2 support
* src/xterm.h (struct x_display_info): Add fields for XKB and XI2
support
* src/gtkutil.c (xg_event_is_for_menubar): Handle XIDeviceEvents
(xg_is_menu_window): New function
(xg_event_is_for_scrollbar): Handle XIDeviceEvents
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index ea2cbab2030..07255911f97 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -105,7 +105,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ /* Flag which when set indicates a dialog or menu has been posted by Xt on behalf of one of the widget sets. */ +#ifndef HAVE_XINPUT2 static int popup_activated_flag; +#else +int popup_activated_flag; +#endif #ifdef USE_X_TOOLKIT |