GNU bug report logs -
#65129
30.0.50; pinch gestures suddenly stops being recognised
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Mon, 7 Aug 2023 16:47:02 UTC
Severity: normal
Found in version 30.0.50
Done: Po Lu <luangruo <at> yahoo.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65129 in the body.
You can then email your comments to 65129 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65129
; Package
emacs
.
(Mon, 07 Aug 2023 16:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Visuwesh <visuweshm <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 07 Aug 2023 16:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Unfortunately, I don't have a good reproducer for this but ever since
updating to master from the emacs-29 branch, pinch gestures in Emacs
frames suddenly stops being recognised. When I do C-h k and pinch, or
view lossage, I see wheel-left and wheel-down events but no pinch event.
However, if I create a new frame and try to pinch there, it works just
fine.
I apologise again for the vague report, but I have nothing better to
offer. So far, I haven't tried to reproduce this in an emacs -Q
session.
In GNU Emacs 30.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, Xaw
scroll bars) of 2023-08-04 built on astatine
Repository revision: 92f9d2b43e1974bf1496e436ad49d3b687ee0d3f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux trixie/sid
Configured using:
'configure --with-sound=alsa --with-x-toolkit=lucid --with-json
--without-xaw3d --without-gconf --without-libsystemd --without-cairo'
Configured features:
ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XFT
XIM XINPUT2 XPM LUCID ZLIB
Important settings:
value of $LC_MONETARY: ta_IN.UTF-8
value of $LC_NUMERIC: ta_IN.UTF-8
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: Article
Minor modes in effect:
recentf-mode: t
text-scale-mode: t
server-mode: t
eros-mode: t
pdf-occur-global-minor-mode: t
vz/random-frame-background-mode: t
minibuffer-depth-indicate-mode: t
repeat-mode: t
display-time-mode: t
display-battery-mode: t
delete-selection-mode: t
xterm-mouse-mode: t
emacs-gc-stats-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
use-hard-newlines: t
tab-bar-history-mode: t
tab-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
undelete-frame-mode: t
buffer-read-only: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow emacsbug image-crop wdired pdf-sync pdf-outline pdf-links
pdf-history icomplete timezone url-http url-gw url-cache url-auth
ind-util goto-addr view bug-reference xref org-pdftools pdf-annot
facemenu org-noter org-num oc-basic org-element org-persist avl-tree
generator ob-gnuplot ob-fortran ob-python python compat compat-macs
ob-julia ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs ob-shell ob-racket async ob-async
cdlatex texmathp org-attach org-id org-refile ol-eww eww url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview
doc-view ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi org-tempo
ol-man org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src
ob-comint org-pcomplete org-list org-footnote org-faces org-entities
ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold
org-fold-core org-keys oc org-loaddefs org-version org-compat org-macs
avy proced misearch multi-isearch display-line-numbers typo inline
transmission calc-bin calc-ext calc calc-loaddefs rect calc-macs reveal
noutline outline add-log pcmpl-unix dabbrev conf-mode pulse gnus-dired
recentf tree-widget shortdoc comp comp-cstr flyspell ispell ecomplete
help-fns radix-tree smerge-mode mule-util ement-tabulated-room-list
ement ement-notify ement-room dns ement-room-list ement-lib ement-api
ement-structs plz ement-macros taxy-magit-section magit-section
benchmark taxy svg-lib color persist flow-fill qp sort gnus-cite
mm-archive mail-extr textsec uni-scripts idna-mapping ucs-normalize
uni-confusable textsec-check gnus-async gnus-bcklg gnus-ml
network-stream nsm nndraft nnmh nndoc nnmaildir nnagent nnml vc-backup
log-view pcvs-util vc diff vc-git diff-mode vc-dispatcher nnnil
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache
gnus-sum shr pixel-fill kinsoku url-file svg gnus-group gnus-undo
gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo
gnus-spec gnus-int gnus-range message sendmail yank-media puny rfc822
mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util
mail-prsvr face-remap sh-script smie treesit executable rfc2104
tramp-cmds tramp-cache time-stamp shell-command+ cursor-sensor server
paredit edmacro kmacro eros checkdoc lisp-mnt flymake-proc flymake
project warnings thingatpt notifications wordel-autoloads
mines-autoloads sokoban-autoloads ement-autoloads svg-lib-autoloads
taxy-magit-section-autoloads magit-section-autoloads dash-autoloads
taxy-autoloads persist-autoloads plz-autoloads nov-autoloads
esxml-autoloads kv-autoloads transmission-autoloads csv-mode-autoloads
lua-mode-autoloads nix-mode-autoloads gnuplot-autoloads
go-mode-autoloads racket-mode-autoloads eros-autoloads
writegood-mode-autoloads siege-mode-autoloads paredit-autoloads
puni-autoloads expand-region-autoloads filladapt-autoloads compose
scroll-other-window org-pdftools-autoloads org-noter-autoloads
change-env-autoloads math-delimiters-autoloads doct-autoloads
ob-async-autoloads async-autoloads emacs-ob-racket-autoloads
valign-autoloads cdlatex-autoloads auctex-autoloads tex-site tempo
pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist advice
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
let-alist pdf-misc imenu pdf-tools package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
url-vars compile cus-edit wid-edit pdf-view jka-compr pdf-cache pdf-info
tq pdf-util pdf-macs image-mode exif pdf-tools-autoloads
tablist-autoloads typo-autoloads mb-depth repeat visual-fill-autoloads
olivetti-autoloads time battery filenotify dom tamil99 quail disp-table
lacarte-autoloads shell-command-plus-autoloads icons delsel xt-mouse
cus-load avy-autoloads skeleton icalendar diary-lib diary-loaddefs
cal-menu calendar cal-loaddefs dired-du-autoloads finder-inf dired-x
filecache imenu-xref-autoloads ert ewoc debug backtrace find-func dbus
xml derived chemtable-autoloads molar-mass-autoloads vc-backup-autoloads
compat-autoloads saveplace-pdf-view saveplace tramp-sh tramp trampver
tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete
comint ansi-osc ring parse-time iso8601 time-date format-spec
auth-source eieio eieio-core password-cache json map byte-opt ansi-color
tramp-loaddefs bookmark text-property-search pp
saveplace-pdf-view-autoloads rx inspector-autoloads xr-autoloads
emacs-gc-stats easy-mmode pcase dired-aux dired dired-loaddefs
emacs-gc-stats-autoloads straight-autoloads cl-seq info cl-extra
help-mode straight subr-x cl-macs gv cl-loaddefs cl-lib bytecomp
byte-compile vz-nh-theme vz-options-theme rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting x-toolkit
xinput2 x multi-tty move-toolbar make-network-process emacs)
Memory information:
((conses 16 2116230 838627) (symbols 48 56857 735)
(strings 32 338567 22862) (string-bytes 1 102822237)
(vectors 16 144418) (vector-slots 8 2567768 204036)
(floats 8 84125 3751) (intervals 56 97617 1520) (buffers 976 105))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65129
; Package
emacs
.
(Tue, 08 Aug 2023 01:00:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 65129 <at> debbugs.gnu.org (full text, mbox):
Visuwesh <visuweshm <at> gmail.com> writes:
> Unfortunately, I don't have a good reproducer for this but ever since
> updating to master from the emacs-29 branch, pinch gestures in Emacs
> frames suddenly stops being recognised. When I do C-h k and pinch, or
> view lossage, I see wheel-left and wheel-down events but no pinch event.
>
> However, if I create a new frame and try to pinch there, it works just
> fine.
>
> I apologise again for the vague report, but I have nothing better to
> offer. So far, I haven't tried to reproduce this in an emacs -Q
> session.
No worries there, please instrument handle_one_xevent like so:
diff --git a/src/xterm.c b/src/xterm.c
index f454733c659..57b06c571f6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -24722,6 +24722,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
x_display_set_last_user_time (dpyinfo, pev->time,
pev->send_event, true);
+ if (device)
+ fprintf (stderr, "XI_GesturePinchBegin: %d\n", device->use);
+ else
+ fprintf (stderr, "XI_GesturePinchBegin: no device\n");
+
if (!device || device->use != XIMasterPointer)
goto XI_OTHER;
and show us what is printed when you attempt a pinch gesture after they
cease being delivered.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65129
; Package
emacs
.
(Wed, 09 Aug 2023 09:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 65129 <at> debbugs.gnu.org (full text, mbox):
[Tuesday August 08, 2023] Po Lu wrote:
> No worries there, please instrument handle_one_xevent like so:
>
> diff --git a/src/xterm.c b/src/xterm.c
> index f454733c659..57b06c571f6 100644
> --- a/src/xterm.c
> +++ b/src/xterm.c
> @@ -24722,6 +24722,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
> x_display_set_last_user_time (dpyinfo, pev->time,
> pev->send_event, true);
>
> + if (device)
> + fprintf (stderr, "XI_GesturePinchBegin: %d\n", device->use);
> + else
> + fprintf (stderr, "XI_GesturePinchBegin: no device\n");
> +
> if (!device || device->use != XIMasterPointer)
> goto XI_OTHER;
>
> and show us what is printed when you attempt a pinch gesture after they
> cease being delivered.
I see nothing being printed once pinch gestures stop being recognised.
I see XI_GesturePinchBegin: 1 a whole bunch of times when they still
work though.
I confirmed that it is printed once again by opening a new frame and
trying the gesture there once it ceased recognised in the original
frame.
P.S., to confirm that I did apply the patch correctly, this is under
"case XI_GesturePinchUpdate:" under handle_one_xevent function right?
When I tried C-c C-a from a diff buffer, I got prompted
Try to auto-fix whitespace loss? (y or n)
(to which I said yes) so I am not so confident that the patch applied
correctly.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65129
; Package
emacs
.
(Wed, 09 Aug 2023 09:48:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 65129 <at> debbugs.gnu.org (full text, mbox):
Visuwesh <visuweshm <at> gmail.com> writes:
> I see nothing being printed once pinch gestures stop being recognised.
> I see XI_GesturePinchBegin: 1 a whole bunch of times when they still
> work though.
> I confirmed that it is printed once again by opening a new frame and
> trying the gesture there once it ceased recognised in the original
> frame.
Yes, thanks.
> P.S., to confirm that I did apply the patch correctly, this is under
> "case XI_GesturePinchUpdate:" under handle_one_xevent function right?
> When I tried C-c C-a from a diff buffer, I got prompted
>
> Try to auto-fix whitespace loss? (y or n)
>
> (to which I said yes) so I am not so confident that the patch applied
> correctly.
Does gesture recognition cease immediately subsequent to displaying a
toolkit menu?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65129
; Package
emacs
.
(Wed, 09 Aug 2023 10:01:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 65129 <at> debbugs.gnu.org (full text, mbox):
[Wednesday August 09, 2023] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>> P.S., to confirm that I did apply the patch correctly, this is under
>> "case XI_GesturePinchUpdate:" under handle_one_xevent function right?
>> When I tried C-c C-a from a diff buffer, I got prompted
>>
>> Try to auto-fix whitespace loss? (y or n)
>>
>> (to which I said yes) so I am not so confident that the patch applied
>> correctly.
>
> Does gesture recognition cease immediately subsequent to displaying a
> toolkit menu?
Yes, you are right!
> Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65129
; Package
emacs
.
(Wed, 09 Aug 2023 12:38:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 65129 <at> debbugs.gnu.org (full text, mbox):
Visuwesh <visuweshm <at> gmail.com> writes:
> [Wednesday August 09, 2023] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>
>>> P.S., to confirm that I did apply the patch correctly, this is under
>>> "case XI_GesturePinchUpdate:" under handle_one_xevent function right?
>>> When I tried C-c C-a from a diff buffer, I got prompted
>>>
>>> Try to auto-fix whitespace loss? (y or n)
>>>
>>> (to which I said yes) so I am not so confident that the patch applied
>>> correctly.
>>
>> Does gesture recognition cease immediately subsequent to displaying a
>> toolkit menu?
>
> Yes, you are right!
>
>> Thanks.
Does the following patch fix your problem?
diff --git a/src/xmenu.c b/src/xmenu.c
index 6d32aa3e078..d4b5b385e11 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1680,6 +1680,19 @@ leave_toolkit_menu (void *data)
XISetMask (m, XI_Enter);
XISetMask (m, XI_Leave);
+#ifdef HAVE_XINPUT2_4
+ /* Select for gesture events. Emacs selects for gesture events from
+ all master devices on non-GTK3 builds, so that event mask is also
+ clobbered by prepare_for_entry_into_toolkit_menu. (bug#65129) */
+
+ if (dpyinfo->xi2_version >= 4)
+ {
+ XISetMask (m, XI_GesturePinchBegin);
+ XISetMask (m, XI_GesturePinchUpdate);
+ XISetMask (m, XI_GesturePinchEnd);
+ }
+#endif /* HAVE_XINPUT2_4 */
+
FOR_EACH_FRAME (tail, frame)
{
f = XFRAME (frame);
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65129
; Package
emacs
.
(Wed, 09 Aug 2023 13:44:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 65129 <at> debbugs.gnu.org (full text, mbox):
[Wednesday August 09, 2023] Po Lu wrote:
> Does the following patch fix your problem?
Yes, it does. Thanks!
> diff --git a/src/xmenu.c b/src/xmenu.c
> index 6d32aa3e078..d4b5b385e11 100644
> --- a/src/xmenu.c
> +++ b/src/xmenu.c
> @@ -1680,6 +1680,19 @@ leave_toolkit_menu (void *data)
> XISetMask (m, XI_Enter);
> XISetMask (m, XI_Leave);
>
> +#ifdef HAVE_XINPUT2_4
> + /* Select for gesture events. Emacs selects for gesture events from
> + all master devices on non-GTK3 builds, so that event mask is also
> + clobbered by prepare_for_entry_into_toolkit_menu. (bug#65129) */
> +
> + if (dpyinfo->xi2_version >= 4)
> + {
> + XISetMask (m, XI_GesturePinchBegin);
> + XISetMask (m, XI_GesturePinchUpdate);
> + XISetMask (m, XI_GesturePinchEnd);
> + }
> +#endif /* HAVE_XINPUT2_4 */
> +
> FOR_EACH_FRAME (tail, frame)
> {
> f = XFRAME (frame);
Reply sent
to
Po Lu <luangruo <at> yahoo.com>
:
You have taken responsibility.
(Thu, 10 Aug 2023 00:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Visuwesh <visuweshm <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 10 Aug 2023 00:39:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 65129-done <at> debbugs.gnu.org (full text, mbox):
Visuwesh <visuweshm <at> gmail.com> writes:
> [Wednesday August 09, 2023] Po Lu wrote:
>
>> Does the following patch fix your problem?
>
> Yes, it does. Thanks!
>
>> diff --git a/src/xmenu.c b/src/xmenu.c
>> index 6d32aa3e078..d4b5b385e11 100644
>> --- a/src/xmenu.c
>> +++ b/src/xmenu.c
>> @@ -1680,6 +1680,19 @@ leave_toolkit_menu (void *data)
>> XISetMask (m, XI_Enter);
>> XISetMask (m, XI_Leave);
>>
>> +#ifdef HAVE_XINPUT2_4
>> + /* Select for gesture events. Emacs selects for gesture events from
>> + all master devices on non-GTK3 builds, so that event mask is also
>> + clobbered by prepare_for_entry_into_toolkit_menu. (bug#65129) */
>> +
>> + if (dpyinfo->xi2_version >= 4)
>> + {
>> + XISetMask (m, XI_GesturePinchBegin);
>> + XISetMask (m, XI_GesturePinchUpdate);
>> + XISetMask (m, XI_GesturePinchEnd);
>> + }
>> +#endif /* HAVE_XINPUT2_4 */
>> +
>> FOR_EACH_FRAME (tail, frame)
>> {
>> f = XFRAME (frame);
I'll install this shortly, and am closing this bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 07 Sep 2023 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.