From: Po Lu Date: Fri, 31 Dec 2021 06:04:40 +0000 (+0800) Subject: Don't select for gesture events on xwidgets if the server is too old X-Git-Tag: emacs-29.0.90~3335 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=080a529f7e9c1a750f39d92f1e8f1e7170d6fb81;p=emacs.git Don't select for gesture events on xwidgets if the server is too old * src/xwidget.c (x_draw_xwidget_glyph_string): Only select for XI gesture events if the server supports XI 2.4 or later. --- diff --git a/src/xwidget.c b/src/xwidget.c index 4f14152833e..36f216d9399 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -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); }