]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't select for gesture events on xwidgets if the server is too old
authorPo Lu <luangruo@yahoo.com>
Fri, 31 Dec 2021 06:04:40 +0000 (14:04 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 31 Dec 2021 06:07:32 +0000 (14:07 +0800)
* src/xwidget.c (x_draw_xwidget_glyph_string): Only select for
XI gesture events if the server supports XI 2.4 or later.

src/xwidget.c

index 4f14152833ee59fe64eb682568bb930d802f4600..36f216d93997998005ac70baba0b75aeb270aa85 100644 (file)
@@ -2247,9 +2247,12 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
          XISetMask (m, XI_Enter);
          XISetMask (m, XI_Leave);
 #ifdef XI_GesturePinchBegin
-         XISetMask (m, XI_GesturePinchBegin);
-         XISetMask (m, XI_GesturePinchUpdate);
-         XISetMask (m, XI_GesturePinchEnd);
+         if (FRAME_DISPLAY_INFO (s->f)->xi2_version >= 4)
+           {
+             XISetMask (m, XI_GesturePinchBegin);
+             XISetMask (m, XI_GesturePinchUpdate);
+             XISetMask (m, XI_GesturePinchEnd);
+           }
 #endif
          XISelectEvents (xv->dpy, xv->wdesc, &mask, 1);
        }