aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-08-10 08:40:48 +0800
committerPo Lu2023-08-10 08:40:48 +0800
commitcdb0b28474c6c577b9f7980187e6444b222016bc (patch)
tree013d9832e65adb784dbb620d61dac08329d350e6 /src
parentcc0a30a876adffa5ec110df9f4e0f21097f6d73e (diff)
downloademacs-cdb0b28474c6c577b9f7980187e6444b222016bc.tar.gz
emacs-cdb0b28474c6c577b9f7980187e6444b222016bc.zip
Fix pinch gestures after toolkit menu
* src/xmenu.c (leave_toolkit_menu): Restore gesture event mask. (bug#65129)
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 6d32aa3e078..2d405d54deb 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1617,6 +1617,7 @@ popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
1617 1617
1618 1618
1619#ifdef HAVE_XINPUT2 1619#ifdef HAVE_XINPUT2
1620
1620static void 1621static void
1621prepare_for_entry_into_toolkit_menu (struct frame *f) 1622prepare_for_entry_into_toolkit_menu (struct frame *f)
1622{ 1623{
@@ -1680,6 +1681,19 @@ leave_toolkit_menu (void *data)
1680 XISetMask (m, XI_Enter); 1681 XISetMask (m, XI_Enter);
1681 XISetMask (m, XI_Leave); 1682 XISetMask (m, XI_Leave);
1682 1683
1684#ifdef HAVE_XINPUT2_4
1685 /* Select for gesture events. Emacs selects for gesture events from
1686 all master devices on non-GTK3 builds, so that event mask is also
1687 clobbered by prepare_for_entry_into_toolkit_menu. (bug#65129) */
1688
1689 if (dpyinfo->xi2_version >= 4)
1690 {
1691 XISetMask (m, XI_GesturePinchBegin);
1692 XISetMask (m, XI_GesturePinchUpdate);
1693 XISetMask (m, XI_GesturePinchEnd);
1694 }
1695#endif /* HAVE_XINPUT2_4 */
1696
1683 FOR_EACH_FRAME (tail, frame) 1697 FOR_EACH_FRAME (tail, frame)
1684 { 1698 {
1685 f = XFRAME (frame); 1699 f = XFRAME (frame);
@@ -1691,7 +1705,8 @@ leave_toolkit_menu (void *data)
1691 &mask, 1); 1705 &mask, 1);
1692 } 1706 }
1693} 1707}
1694#endif 1708
1709#endif /* HAVE_XINPUT2 */
1695 1710
1696/* ID is the LWLIB ID of the dialog box. */ 1711/* ID is the LWLIB ID of the dialog box. */
1697 1712