diff options
| author | Po Lu | 2022-03-09 21:29:17 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-09 21:29:17 +0800 |
| commit | fe8d49e1add8421afb16f5666bdbbabc7704f9c1 (patch) | |
| tree | ce5fad64ced4709e851649984d506af067d8d449 /src/xmenu.c | |
| parent | b883e8bc65d314273b63da873e1cdbbac23978e9 (diff) | |
| download | emacs-fe8d49e1add8421afb16f5666bdbbabc7704f9c1.tar.gz emacs-fe8d49e1add8421afb16f5666bdbbabc7704f9c1.zip | |
Make XInput 2 features work on GTK 2 builds
* src/xfns.c (setup_xi_event_mask): On GTK 2, select for
button, motion, entry/exit and key events.
* src/xmenu.c (create_and_show_popup_menu): Clear XI grab if
appropriate.
* src/xterm.c (handle_one_xevent): Pass some kinds of input
extension events to GTK manually on versions of GTK+ that don't
understand them.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 4d0e5bd81c2..d19fe13c295 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1527,6 +1527,23 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, | |||
| 1527 | if (i == 5) i = 0; | 1527 | if (i == 5) i = 0; |
| 1528 | } | 1528 | } |
| 1529 | 1529 | ||
| 1530 | #if !defined HAVE_GTK3 && defined HAVE_XINPUT2 | ||
| 1531 | if (FRAME_DISPLAY_INFO (f)->num_devices) | ||
| 1532 | { | ||
| 1533 | for (int i = 0; i < FRAME_DISPLAY_INFO (f)->num_devices; ++i) | ||
| 1534 | { | ||
| 1535 | if (FRAME_DISPLAY_INFO (f)->devices[i].grab) | ||
| 1536 | { | ||
| 1537 | FRAME_DISPLAY_INFO (f)->devices[i].grab = 0; | ||
| 1538 | |||
| 1539 | XIUngrabDevice (FRAME_X_DISPLAY (f), | ||
| 1540 | FRAME_DISPLAY_INFO (f)->devices[i].device_id, | ||
| 1541 | CurrentTime); | ||
| 1542 | } | ||
| 1543 | } | ||
| 1544 | } | ||
| 1545 | #endif | ||
| 1546 | |||
| 1530 | /* Display the menu. */ | 1547 | /* Display the menu. */ |
| 1531 | gtk_widget_show_all (menu); | 1548 | gtk_widget_show_all (menu); |
| 1532 | 1549 | ||