From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 16 11:49:33 2025 Received: (at submit) by debbugs.gnu.org; 16 Jul 2025 15:49:33 +0000 Received: from localhost ([127.0.0.1]:50295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uc4Nw-0005jD-Fd for submit@debbugs.gnu.org; Wed, 16 Jul 2025 11:49:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58498) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uc4Ns-0005if-P6 for submit@debbugs.gnu.org; Wed, 16 Jul 2025 11:49:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uc4Ni-0006zS-Hg for bug-gnu-emacs@gnu.org; Wed, 16 Jul 2025 11:49:20 -0400 Received: from out-184.mta0.migadu.com ([2001:41d0:1004:224b::b8]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uc4Ne-0007g2-LQ for bug-gnu-emacs@gnu.org; Wed, 16 Jul 2025 11:49:18 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piater.name; s=key1; t=1752680940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=TOWb5L9ySIXMq7iKKkiwVvrBTBgjpRXbBZ/0WWECxYg=; b=ngfboX5jNJBxE6d17FQiy7Rr/ogp29InOug6PhsehDeSo0mVBOwdzx+MVZu2zKFQcb5ewj 2920fcrP7xmbaAtyx00XMgdKC7RLmmX5DDUnJ8/9JLY0CSNSxexw5hEtMSSi8awUmm0m7W p/L3oZhPKi+TG3568jbzw/SynkEUy63gbmclJwgcbaKNBqaQPlrhgDP3VxkaswXb2QQAyM gPJjQRcXD1jAisj9ZOsFFwMG1WLu2box8hQnhpOgWlsFwNtNLFlXubFpAmr24FHu7H/4FT JC2bhzj3Ki+GNy5+dlkDpnu3yNRqlrQuv7bgFLI6NIG20mN+JIYUkkcayPxxlA== From: Justus-dev@Piater.name To: bug-gnu-emacs@gnu.org Subject: 30.1; Stylus (Wacom Pen) Support under Wayland X-Debbugs-Cc: Date: Wed, 16 Jul 2025 17:48:58 +0200 Message-ID: <87o6tkcf11.fsf@uibk.ac.at> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::b8; envelope-from=Justus-dev@piater.name; helo=out-184.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) In a text-mode buffer I'd generally expect the stylus to behave like the mouse-1 button (press-drag-release highlights a text region), but it does not. In the following, "cursor" refers to Emacs' text cursor, and "pointer" refers to the graphical pointer controlled by the mouse and the stylus. 1. Start emacs -Q in a Wayland session. In the *scratch* buffer: 2. Use the mouse to move the pointer over a text character (without pressing a button). 3. Tap a different character with the stylus (pen-down). Expected effect: The cursor is placed at the pen-down location. Actual effect: The cursor is placed at the location where the pointer was before pen-down, and the region of text between cursor and pointer (now at the pen-down location) is highlighted. 4. Drag the stylus. Expected effect: Pointer and cursor follow the stylus, and the region between pen-down and cursor is highlighted. Actual effect: Pointer follows stylus, but cursor and highlighted region remain unchanged. 5. Lift the stylus (pen-up). Expected and actual effect: The cursor is located at the pen-up location, and the region between pen-down and pen-up is highlighted. 6. Iterate Steps 3-5. The above description always holds. In particular, at Step 3, "the location where the pointer was before pen-down" is if the mouse was moved since the preceding pen-up (as in Step 2): the pointer location where the mouse left it before pen-down, otherwise: the preceding pen-up location. Both are, of course, unexpected behavior. After Steps 1-5, C-h l gives me the following: ;; mouse-drag-region ;; anonymous-command ... [repeats many times] ;; anonymous-command ;; mouse-set-region C-h l ;; view-lossage This behavior makes it impossible to use the stylus for drawing inside Emacs, e.g. using artist-mode or el-easydraw (https://github.com/misohena/el-easydraw/issues/40). This behavior appears to be specific to Wayland, perhaps even to my compositor (swaywm). In particular, X (by default) appears to treat the stylus like the mouse: - xev (running under Xwayland) reports stylus interactions as mouse events, but wev reports stylus interactions as "zwp_tablet_tool_v2" events. - If I run Emacs under Xwayland (GDK_BACKEND=X11 emacs -Q), the stylus behaves identically to the mouse. Thus, for starters, it would be interesting if other Wayland users, using the same or different compositors, observe the same behavior. In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) System Description: Arch Linux Configured using: 'configure --with-pgtk --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --disable-build-details --with-cairo --with-harfbuzz --with-libsystemd --with-modules --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $LC_COLLATE: de_AT.UTF-8 value of $LC_MONETARY: de_AT.UTF-8 value of $LC_TIME: de_AT.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Help Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t isearch-fold-quotes-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t buffer-read-only: t line-number-mode: 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 sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win touch-screen pgtk-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 cairo gtk pgtk lcms2 multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 53221 8904) (symbols 48 5611 0) (strings 32 14333 3337) (string-bytes 1 471846) (vectors 16 9250) (vector-slots 8 128560 7593) (floats 8 26 35) (intervals 56 286 4) (buffers 992 12)) From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 16 12:40:20 2025 Received: (at 79032) by debbugs.gnu.org; 16 Jul 2025 16:40:20 +0000 Received: from localhost ([127.0.0.1]:50382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uc5B5-0008Qa-QX for submit@debbugs.gnu.org; Wed, 16 Jul 2025 12:40:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35042) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uc5B0-0008PR-P1 for 79032@debbugs.gnu.org; Wed, 16 Jul 2025 12:40:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uc5At-0008K5-QF; Wed, 16 Jul 2025 12:40:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2fF7VEn1NAw+38dTxCy5pwhs/rTPx817zrzTatmWU1w=; b=eEqNEZZmZN64 V3Z6vOtn5XoOThkhjNCH+oSGvMfRMP3EbPiqIdYjEaHv9ipGJxpgWtavACasCTuB45c72HsJJl9vN uWL8MhOasoq91i83AxjvmnfU/ENmMeDa82LYJ6EQ5jALX25ldR/w0kUZ6cC8g8hdFd9G5M4Y9lojs CEYNB1bhMNEVqy1kYr2Kx4PZEzT2K/Aiffx3Zs+w6mITER3k4OgGnBwZc9TLx2DZM6EfH+st+i+Qq AVUvVvUBW+xsH3hnaGxnMlC0ampwE0Azz/T5v5vi7ToAV0NTWcHnHpRQPqdcM3mYZJyr1+SNmDt2v umOgSKPPJI1qTTrZO9/bzA==; Date: Wed, 16 Jul 2025 19:40:04 +0300 Message-Id: <86frewhyxn.fsf@gnu.org> From: Eli Zaretskii To: Justus-dev@Piater.name, Po Lu In-Reply-To: <87o6tkcf11.fsf@uibk.ac.at> (bug-gnu-emacs@gnu.org) Subject: Re: bug#79032: 30.1; Stylus (Wacom Pen) Support under Wayland References: <87o6tkcf11.fsf@uibk.ac.at> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79032 Cc: 79032@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 16 Jul 2025 17:48:58 +0200 > From: Justus-dev--- via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > In a text-mode buffer I'd generally expect the stylus to behave like the > mouse-1 button (press-drag-release highlights a text region), but it > does not. In the following, "cursor" refers to Emacs' text cursor, and > "pointer" refers to the graphical pointer controlled by the mouse and > the stylus. > > 1. Start emacs -Q in a Wayland session. In the *scratch* buffer: > > 2. Use the mouse to move the pointer over a text character (without > pressing a button). > > 3. Tap a different character with the stylus (pen-down). > > Expected effect: The cursor is placed at the pen-down location. > > Actual effect: The cursor is placed at the location where the pointer > was before pen-down, and the region of text between cursor and > pointer (now at the pen-down location) is highlighted. > > 4. Drag the stylus. > > Expected effect: Pointer and cursor follow the stylus, and the region > between pen-down and cursor is highlighted. > > Actual effect: Pointer follows stylus, but cursor and highlighted > region remain unchanged. > > 5. Lift the stylus (pen-up). > > Expected and actual effect: The cursor is located at the pen-up > location, and the region between pen-down and pen-up is highlighted. > > 6. Iterate Steps 3-5. The above description always holds. In particular, > at Step 3, "the location where the pointer was before pen-down" is > > if the mouse was moved since the preceding pen-up (as in Step 2): > the pointer location where the mouse left it before pen-down, > > otherwise: > the preceding pen-up location. > > Both are, of course, unexpected behavior. > > After Steps 1-5, C-h l gives me the following: > > ;; mouse-drag-region > ;; anonymous-command > ... [repeats many times] > ;; anonymous-command > ;; mouse-set-region > C-h l ;; view-lossage Thanks. This seems to imply that the stylus doesn't produce mouse-up events in this case? Because otherwise, you should have seen events as well. Po Lu, any ideas? Is this a known issue with Wayland? > This behavior makes it impossible to use the stylus for drawing inside > Emacs, e.g. using artist-mode or el-easydraw > (https://github.com/misohena/el-easydraw/issues/40). > > This behavior appears to be specific to Wayland, perhaps even to my > compositor (swaywm). In particular, X (by default) appears to treat the > stylus like the mouse: > > - xev (running under Xwayland) reports stylus interactions as mouse > events, but wev reports stylus interactions as "zwp_tablet_tool_v2" > events. > > - If I run Emacs under Xwayland (GDK_BACKEND=X11 emacs -Q), the stylus > behaves identically to the mouse. > > Thus, for starters, it would be interesting if other Wayland users, > using the same or different compositors, observe the same behavior. > > > In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, > cairo version 1.18.4) > System Description: Arch Linux > > Configured using: > 'configure --with-pgtk --sysconfdir=/etc --prefix=/usr > --libexecdir=/usr/lib --localstatedir=/var --disable-build-details > --with-cairo --with-harfbuzz --with-libsystemd --with-modules > --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-march=x86-64 > -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 > -Wformat -Werror=format-security -fstack-clash-protection > -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g > -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' > 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro > -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' > 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions > -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security > -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer > -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g > -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY > PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB > > Important settings: > value of $LC_COLLATE: de_AT.UTF-8 > value of $LC_MONETARY: de_AT.UTF-8 > value of $LC_TIME: de_AT.UTF-8 > value of $LANG: en_US.UTF-8 > locale-coding-system: utf-8-unix > > Major mode: Help > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > isearch-fold-quotes-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > minibuffer-regexp-mode: t > buffer-read-only: t > line-number-mode: 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 sort mail-extr emacsbug message mailcap yank-media puny dired > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > epg-config gnus-util text-property-search time-date subr-x mm-decode > mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader > sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils > help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren > electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel > term/pgtk-win pgtk-win term/common-win touch-screen pgtk-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 cairo gtk pgtk > lcms2 multi-tty move-toolbar make-network-process native-compile emacs) > > Memory information: > ((conses 16 53221 8904) (symbols 48 5611 0) (strings 32 14333 3337) > (string-bytes 1 471846) (vectors 16 9250) > (vector-slots 8 128560 7593) (floats 8 26 35) (intervals 56 286 4) > (buffers 992 12)) > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 26 04:55:49 2025 Received: (at 79032) by debbugs.gnu.org; 26 Jul 2025 08:55:49 +0000 Received: from localhost ([127.0.0.1]:39814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ufah2-0001SU-Bq for submit@debbugs.gnu.org; Sat, 26 Jul 2025 04:55:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33694) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ufah0-0001S3-1V for 79032@debbugs.gnu.org; Sat, 26 Jul 2025 04:55:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ufagu-0007nD-JN; Sat, 26 Jul 2025 04:55:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YZvcWNdM5BH/oZmgcYsRGPtgCPHnf6J3vQiGi4Em798=; b=N44li28q/pfS +4kT4/m2DCwa5gUdYkm3/GjU43SPNB7BcXAtiDXN0zFMXizpEEDVV1dQITHF4/rZs9iT0JXXghM+h shDP91NczL9oZmv9ZRkCLLyNbRmibKiJIcqB/8n6OOBOnaoPuDq+CmUTMbKjoE0C8c7m1+0fMGccL gKHy04Dr8/USHywNSQUH2ekBNvZOBhJ+W0Z1MjGDq8lhrcTl9GaxiazLEr4YLYwxVdCg7o17jE25T Yoysh91+MDfFf2QkIuUdFRDsX149oQd61hrUOUDRj2svwpQAFOwTE4sXPN1wLpQ5y3dcwct2SdiS3 Bxy+afv/a7tJBS9998BhzQ==; Date: Sat, 26 Jul 2025 11:55:19 +0300 Message-Id: <86pldn1gco.fsf@gnu.org> From: Eli Zaretskii To: Po Lu , waylandthrowaway@gmail.com In-Reply-To: <86frewhyxn.fsf@gnu.org> (message from Eli Zaretskii on Wed, 16 Jul 2025 19:40:04 +0300) Subject: Re: bug#79032: 30.1; Stylus (Wacom Pen) Support under Wayland References: <87o6tkcf11.fsf@uibk.ac.at> <86frewhyxn.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79032 Cc: 79032@debbugs.gnu.org, Justus-dev@Piater.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! > Cc: 79032@debbugs.gnu.org > Date: Wed, 16 Jul 2025 19:40:04 +0300 > From: Eli Zaretskii > > > Date: Wed, 16 Jul 2025 17:48:58 +0200 > > From: Justus-dev--- via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > In a text-mode buffer I'd generally expect the stylus to behave like the > > mouse-1 button (press-drag-release highlights a text region), but it > > does not. In the following, "cursor" refers to Emacs' text cursor, and > > "pointer" refers to the graphical pointer controlled by the mouse and > > the stylus. > > > > 1. Start emacs -Q in a Wayland session. In the *scratch* buffer: > > > > 2. Use the mouse to move the pointer over a text character (without > > pressing a button). > > > > 3. Tap a different character with the stylus (pen-down). > > > > Expected effect: The cursor is placed at the pen-down location. > > > > Actual effect: The cursor is placed at the location where the pointer > > was before pen-down, and the region of text between cursor and > > pointer (now at the pen-down location) is highlighted. > > > > 4. Drag the stylus. > > > > Expected effect: Pointer and cursor follow the stylus, and the region > > between pen-down and cursor is highlighted. > > > > Actual effect: Pointer follows stylus, but cursor and highlighted > > region remain unchanged. > > > > 5. Lift the stylus (pen-up). > > > > Expected and actual effect: The cursor is located at the pen-up > > location, and the region between pen-down and pen-up is highlighted. > > > > 6. Iterate Steps 3-5. The above description always holds. In particular, > > at Step 3, "the location where the pointer was before pen-down" is > > > > if the mouse was moved since the preceding pen-up (as in Step 2): > > the pointer location where the mouse left it before pen-down, > > > > otherwise: > > the preceding pen-up location. > > > > Both are, of course, unexpected behavior. > > > > After Steps 1-5, C-h l gives me the following: > > > > ;; mouse-drag-region > > ;; anonymous-command > > ... [repeats many times] > > ;; anonymous-command > > ;; mouse-set-region > > C-h l ;; view-lossage > > Thanks. > > This seems to imply that the stylus doesn't produce mouse-up events in > this case? Because otherwise, you should have seen events > as well. > > Po Lu, any ideas? Is this a known issue with Wayland? > > > This behavior makes it impossible to use the stylus for drawing inside > > Emacs, e.g. using artist-mode or el-easydraw > > (https://github.com/misohena/el-easydraw/issues/40). > > > > This behavior appears to be specific to Wayland, perhaps even to my > > compositor (swaywm). In particular, X (by default) appears to treat the > > stylus like the mouse: > > > > - xev (running under Xwayland) reports stylus interactions as mouse > > events, but wev reports stylus interactions as "zwp_tablet_tool_v2" > > events. > > > > - If I run Emacs under Xwayland (GDK_BACKEND=X11 emacs -Q), the stylus > > behaves identically to the mouse. > > > > Thus, for starters, it would be interesting if other Wayland users, > > using the same or different compositors, observe the same behavior. > > > > > > In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, > > cairo version 1.18.4) > > System Description: Arch Linux > > > > Configured using: > > 'configure --with-pgtk --sysconfdir=/etc --prefix=/usr > > --libexecdir=/usr/lib --localstatedir=/var --disable-build-details > > --with-cairo --with-harfbuzz --with-libsystemd --with-modules > > --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-march=x86-64 > > -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 > > -Wformat -Werror=format-security -fstack-clash-protection > > -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g > > -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' > > 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro > > -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' > > 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions > > -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security > > -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer > > -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g > > -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' > > > > Configured features: > > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > > LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY > > PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF > > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB > > > > Important settings: > > value of $LC_COLLATE: de_AT.UTF-8 > > value of $LC_MONETARY: de_AT.UTF-8 > > value of $LC_TIME: de_AT.UTF-8 > > value of $LANG: en_US.UTF-8 > > locale-coding-system: utf-8-unix > > > > Major mode: Help > > > > Minor modes in effect: > > tooltip-mode: t > > global-eldoc-mode: t > > show-paren-mode: t > > electric-indent-mode: t > > mouse-wheel-mode: t > > tool-bar-mode: t > > menu-bar-mode: t > > file-name-shadow-mode: t > > isearch-fold-quotes-mode: t > > global-font-lock-mode: t > > font-lock-mode: t > > blink-cursor-mode: t > > minibuffer-regexp-mode: t > > buffer-read-only: t > > line-number-mode: 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 sort mail-extr emacsbug message mailcap yank-media puny dired > > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > > epg-config gnus-util text-property-search time-date subr-x mm-decode > > mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader > > sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils > > help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren > > electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel > > term/pgtk-win pgtk-win term/common-win touch-screen pgtk-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 cairo gtk pgtk > > lcms2 multi-tty move-toolbar make-network-process native-compile emacs) > > > > Memory information: > > ((conses 16 53221 8904) (symbols 48 5611 0) (strings 32 14333 3337) > > (string-bytes 1 471846) (vectors 16 9250) > > (vector-slots 8 128560 7593) (floats 8 26 35) (intervals 56 286 4) > > (buffers 992 12)) > > > > > > > > > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 26 07:44:44 2025 Received: (at 79032) by debbugs.gnu.org; 26 Jul 2025 11:44:44 +0000 Received: from localhost ([127.0.0.1]:40676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ufdKU-0002ia-MA for submit@debbugs.gnu.org; Sat, 26 Jul 2025 07:44:43 -0400 Received: from out-173.mta1.migadu.com ([95.215.58.173]:41495) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ufdKG-0002ha-Dl for 79032@debbugs.gnu.org; Sat, 26 Jul 2025 07:44:37 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piater.name; s=key1; t=1753530261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RZfUTvAg2buXJX1M+MYG61aO1/+v4WCA+AdIOwdZIXk=; b=BCBYfsvg5KDYQAxr0inIu61wa0XZYEdRsz6XyXEt7dbfwQqceM0JzM2xt8jaonEJhzInha DJ6DjBlmkrXxBokwZ+3zrLN2sWrZygGhMkJm9x8BOnykbLlgcP1o+Fw0kh3h1+3HGLN87g XP7drNfOKIoiqfh7hzRqb4pgf0yIKa71kg4iZ7ioAFpEWBF3K+LAVYH/Wrfl+6aT8n2AbT x+a4hSSHQmULKFu7XMT+0OQHdH0fRBsEPABRZj743PG/xjQcF1UrEa/YP19/fDJidTXMTl AWbYTBC85rDd2n+7t1sscDzTkb0rifSWABvcg5RR3+13z6wAcA+zhkOwuOLd4A== From: Justus-dev@Piater.name To: 79032@debbugs.gnu.org Subject: Re: 30.1; Stylus (Wacom Pen) Support under Wayland In-Reply-To: <87o6tkcf11.fsf@uibk.ac.at> (Justus-dev@piater.name's message of "Wed, 16 Jul 2025 17:48:58 +0200") References: <87o6tkcf11.fsf@uibk.ac.at> Date: Sat, 26 Jul 2025 13:44:16 +0200 Message-ID: <87ecu3gorz.fsf@uibk.ac.at> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79032 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) The behavior subtly depends on the Wayland compositor. I just tried this under niri. The behavior is the same as under sway, with one notable difference: > 6. [...] > at Step 3, "the location where the pointer was before pen-down" is > > if the mouse was moved since the preceding pen-up (as in Step 2): > the pointer location where the mouse left it before pen-down, > > otherwise: Under sway: > the preceding pen-up location. Under niri, "the location where the pointer was before pen-down" if the mouse was not moved is instead: the preceding location where the pen went out of range. In other words, as long as the mouse is not moved, the interim highlight always begins where the preceding highlight ended, while under niri it always begins at the same place, as long as the stylus is not removed too far from the screen. Notably, if I use the stylus to highlight text in Firefox, it always works as expected, unlike Emacs and for both sway and niri. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 09 08:08:10 2025 Received: (at 79032) by debbugs.gnu.org; 9 Aug 2025 12:08:10 +0000 Received: from localhost ([127.0.0.1]:40561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ukiMr-000786-M2 for submit@debbugs.gnu.org; Sat, 09 Aug 2025 08:08:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45074) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ukiMo-00077R-1g for 79032@debbugs.gnu.org; Sat, 09 Aug 2025 08:08:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ukiMi-0001Ig-Ke; Sat, 09 Aug 2025 08:08:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=aTR/20AejqBajV5Fi1tT5sMusQf/dqJ5qKe1OwMc+Zk=; b=Xs6TyfyFb8ZM Hwe7dFVLb4WpepKTOrKy/XuoLyX8B3lGbg03MEV2mfZeX6rHLWsmDRGUrKqAdf8HCFMsHUAPC5oS3 h5WhIjqsYsF8QUJEuyLXYM5LilNOa6/qHYPJFYzMtWhYlIlVIl5ft3dtuawBz4iliG4uRGdOa0CfQ FNICz0+fNIEdjgewQiAXPz6tjOQr2fSg0ZratrbL8T/rBcQwSH9AX1IaNoUddTgLRSnxI8dFS+X8C mlvJAzhfrNGyOe8clpWozOavq+R9QPYiSlayCFYHzlM1wn5aNQRohubi72YKpGEghOjWCCZShoWxb S+yX82ydMboXfBmEiB9x6w==; Date: Sat, 09 Aug 2025 15:07:57 +0300 Message-Id: <86zfc8lmua.fsf@gnu.org> From: Eli Zaretskii To: luangruo@yahoo.com, waylandthrowaway@gmail.com In-Reply-To: <86pldn1gco.fsf@gnu.org> (message from Eli Zaretskii on Sat, 26 Jul 2025 11:55:19 +0300) Subject: Re: bug#79032: 30.1; Stylus (Wacom Pen) Support under Wayland References: <87o6tkcf11.fsf@uibk.ac.at> <86frewhyxn.fsf@gnu.org> <86pldn1gco.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79032 Cc: 79032@debbugs.gnu.org, Justus-dev@Piater.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Ping! Po Lu, please respond. > Cc: 79032@debbugs.gnu.org, Justus-dev@Piater.name > Date: Sat, 26 Jul 2025 11:55:19 +0300 > From: Eli Zaretskii > > Ping! > > > Cc: 79032@debbugs.gnu.org > > Date: Wed, 16 Jul 2025 19:40:04 +0300 > > From: Eli Zaretskii > > > > > Date: Wed, 16 Jul 2025 17:48:58 +0200 > > > From: Justus-dev--- via "Bug reports for GNU Emacs, > > > the Swiss army knife of text editors" > > > > > > In a text-mode buffer I'd generally expect the stylus to behave like the > > > mouse-1 button (press-drag-release highlights a text region), but it > > > does not. In the following, "cursor" refers to Emacs' text cursor, and > > > "pointer" refers to the graphical pointer controlled by the mouse and > > > the stylus. > > > > > > 1. Start emacs -Q in a Wayland session. In the *scratch* buffer: > > > > > > 2. Use the mouse to move the pointer over a text character (without > > > pressing a button). > > > > > > 3. Tap a different character with the stylus (pen-down). > > > > > > Expected effect: The cursor is placed at the pen-down location. > > > > > > Actual effect: The cursor is placed at the location where the pointer > > > was before pen-down, and the region of text between cursor and > > > pointer (now at the pen-down location) is highlighted. > > > > > > 4. Drag the stylus. > > > > > > Expected effect: Pointer and cursor follow the stylus, and the region > > > between pen-down and cursor is highlighted. > > > > > > Actual effect: Pointer follows stylus, but cursor and highlighted > > > region remain unchanged. > > > > > > 5. Lift the stylus (pen-up). > > > > > > Expected and actual effect: The cursor is located at the pen-up > > > location, and the region between pen-down and pen-up is highlighted. > > > > > > 6. Iterate Steps 3-5. The above description always holds. In particular, > > > at Step 3, "the location where the pointer was before pen-down" is > > > > > > if the mouse was moved since the preceding pen-up (as in Step 2): > > > the pointer location where the mouse left it before pen-down, > > > > > > otherwise: > > > the preceding pen-up location. > > > > > > Both are, of course, unexpected behavior. > > > > > > After Steps 1-5, C-h l gives me the following: > > > > > > ;; mouse-drag-region > > > ;; anonymous-command > > > ... [repeats many times] > > > ;; anonymous-command > > > ;; mouse-set-region > > > C-h l ;; view-lossage > > > > Thanks. > > > > This seems to imply that the stylus doesn't produce mouse-up events in > > this case? Because otherwise, you should have seen events > > as well. > > > > Po Lu, any ideas? Is this a known issue with Wayland? > > > > > This behavior makes it impossible to use the stylus for drawing inside > > > Emacs, e.g. using artist-mode or el-easydraw > > > (https://github.com/misohena/el-easydraw/issues/40). > > > > > > This behavior appears to be specific to Wayland, perhaps even to my > > > compositor (swaywm). In particular, X (by default) appears to treat the > > > stylus like the mouse: > > > > > > - xev (running under Xwayland) reports stylus interactions as mouse > > > events, but wev reports stylus interactions as "zwp_tablet_tool_v2" > > > events. > > > > > > - If I run Emacs under Xwayland (GDK_BACKEND=X11 emacs -Q), the stylus > > > behaves identically to the mouse. > > > > > > Thus, for starters, it would be interesting if other Wayland users, > > > using the same or different compositors, observe the same behavior. > > > > > > > > > In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, > > > cairo version 1.18.4) > > > System Description: Arch Linux > > > > > > Configured using: > > > 'configure --with-pgtk --sysconfdir=/etc --prefix=/usr > > > --libexecdir=/usr/lib --localstatedir=/var --disable-build-details > > > --with-cairo --with-harfbuzz --with-libsystemd --with-modules > > > --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-march=x86-64 > > > -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 > > > -Wformat -Werror=format-security -fstack-clash-protection > > > -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g > > > -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' > > > 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro > > > -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' > > > 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions > > > -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security > > > -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer > > > -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g > > > -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' > > > > > > Configured features: > > > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > > > LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY > > > PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF > > > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB > > > > > > Important settings: > > > value of $LC_COLLATE: de_AT.UTF-8 > > > value of $LC_MONETARY: de_AT.UTF-8 > > > value of $LC_TIME: de_AT.UTF-8 > > > value of $LANG: en_US.UTF-8 > > > locale-coding-system: utf-8-unix > > > > > > Major mode: Help > > > > > > Minor modes in effect: > > > tooltip-mode: t > > > global-eldoc-mode: t > > > show-paren-mode: t > > > electric-indent-mode: t > > > mouse-wheel-mode: t > > > tool-bar-mode: t > > > menu-bar-mode: t > > > file-name-shadow-mode: t > > > isearch-fold-quotes-mode: t > > > global-font-lock-mode: t > > > font-lock-mode: t > > > blink-cursor-mode: t > > > minibuffer-regexp-mode: t > > > buffer-read-only: t > > > line-number-mode: 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 sort mail-extr emacsbug message mailcap yank-media puny dired > > > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > > > epg-config gnus-util text-property-search time-date subr-x mm-decode > > > mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader > > > sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils > > > help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren > > > electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel > > > term/pgtk-win pgtk-win term/common-win touch-screen pgtk-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 cairo gtk pgtk > > > lcms2 multi-tty move-toolbar make-network-process native-compile emacs) > > > > > > Memory information: > > > ((conses 16 53221 8904) (symbols 48 5611 0) (strings 32 14333 3337) > > > (string-bytes 1 471846) (vectors 16 9250) > > > (vector-slots 8 128560 7593) (floats 8 26 35) (intervals 56 286 4) > > > (buffers 992 12)) > > > > > > > > > > > > > > > > > > > > > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 09 09:07:25 2025 Received: (at 79032) by debbugs.gnu.org; 9 Aug 2025 13:07:25 +0000 Received: from localhost ([127.0.0.1]:40811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ukjIC-0004c4-KG for submit@debbugs.gnu.org; Sat, 09 Aug 2025 09:07:24 -0400 Received: from sonic308-56.consmr.mail.ne1.yahoo.com ([66.163.187.31]:42980) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ukjI6-0004be-Ni for 79032@debbugs.gnu.org; Sat, 09 Aug 2025 09:07:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1754744832; bh=RGI0m8j8PKC0W/hJtQv9bjtkDhsrhxcKifIOs1jPUYg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Wpjk0s18ISZeJIv3M+ZDcaVMjaBSSI0XDbA6/y3J0XgMyL5ILUodByBcOV5l1ItYVCHJny6xPCdYlsdIaukLThZM40x/CmLzWFKyAjycRvDJZiKmZ3ab8lFt7XhtbAnwuc/yrv6gTeLw9gvlwB/5fEEusnNXq02gKEdaoFiqrqFHyzXWGkezo3f4EzPoojg82JuF/VLniA4s7X2XEt1oxFFE5YSe/CZHLUPfUT2NUxlbrLmeyqX699ApPKZL/DPl2wzKMBKnlhCqzDvktbXUANW270bm8PCPwl4yiPzffJfk64ppHj45BfavYV1N7JvsoxTjWKKZAOzJDwT8wjRX3g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1754744832; bh=g+c+xBpjpCn29x+r0d+Yaw0ckegu+PKatlWZWVu60mY=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=L4ggE2drjqlEXN6I7LTqmhqA+lACLMZbglN7atkYSLMokBCgOePqQZUtYwhOcu6ABJ/RrSlslB3ojlUp8WGNy3qs6wVOETevtM3KyQ8sFg6rYOe7g8lxAc/fUL9zyZY80bC6uez4LU9Vq/mUtIu56yLpj0U0L8UU6y0YX3gunQCqTSXKPg8kRzZqtg7B4jPGdIPZw7twlEx8ikmc2KiaHihY31O2UrNaM9NDWBewOWJBvEMv0WOzhToiKq6SaffBvzRd7iZdHUM2fpPxCYEGrRru1uhGJEA3N9YTGTdl5ZlEGNQtxP2MH4mt0Cz+vEQyPLkWTzYlSP2BT2WxN1Yp7A== X-YMail-OSG: q0Kh20MVM1kufr0uhHsNBERnyy5kUZkFlKwmwrii.Sf7jFJ.NLRHwz1oc0fl6NU 8RjGJmZsOcKp2njeMQrZb8osO2PJcrrZKBZ5fHhYXYCzzHxQSU91igQm.bUbAkQ9pLmh3gyBjGPz k5DYRHSsBYwH_Rjj.6gCZnUI_tKQqtYZcQt8II1byRu4mOd6xtkQV88tAhA9w322nDSaOLLF9sWP 5BTq.k7.b8_Rw9S_lFZQA9VregALKIe_BLjfHkX4uN7fpl2qLH7fdUhU8Zsf2jjr3vRwZjpFclIZ gzjBB_3xFb4Y6z7lbCBi1RByoikMaUZTDIO3QPDOePndCqvmqz75hMFD3wqTEhMTDnhCxwWyHFzD cb987eqEz7Yy1xwReytwR_mrKiy2oXfKG6koDAZ_eEOFzbDdc7HJYCRvpkSO5bdjG0xL.q_7by6Q 1ogvNZeoKPhKjfNOGABo6bqkrODm.wbKvJhhnSsaHmiuFS3Yb2VDmMWhNj6SDDBQOz1yiFhiXkOy qgX.J03oFI4tZa5WAyy9EVUw_ytRNMG0MTyfWwnPeas5BLq0m9MLf3PC7CrUcv6FDJmSONpyeNeq jQlw7gWPF7iFNiQwR8ARW166r563zJs8DV0Qd0brPa.vqYsdG2fWnvCZJdelgIuvOvVMTWKs2bhj U02a36dO6QD_BLQ4oBc4GOSKMZJFbWsozZNG4QN0ahkW5G7H58OGegEYPc8f0ASEI8eGviXYghUP DbXkD7tKJ7iygrI1j28VoFuIsx7_2ZVr0D7aSNIcSqyQgWv4K9L95g7rpc1GZoxtIL5fNRu1W_5S 13LY30GGY6a3u8XGVvKjf8q82lmEF6mts98tk6.LCwzHbMAhl90PrPmVxlSPSOBvOAoHH_W.YqFx dvVFzBOscKr6S0odXbclS4dYVO.y8vRQ5Xj00HcSMlgCICKBtQMRffGqznvV5kqKph9AnOpj5Hxg T41IiJPd1NJkRJlCeLurjzHLf9ETXBhpH0I4aaqA2LbEXnZc2DsWpQoOiDE1gwqmUcBAFnuc9HTq 7Z6YHKYEGeE3I1GGLAaqU9gyKFtI0uj3E0K6Hmrsp79d8PPFL5NbA3b4shCOcm1d7j1dVw78inBe 1ShgSFdpoxLBQ6ahZu54DUfy92CLUyl6zeb1ppVcLL1sApjyq6nf901vb2mD__Q7Bdtby3B1IEtx KgkfOB64Ng0qY_jmx3b.D_QT0jQvtmMcOZM3eyuaiKeui2rZT8KmTGluzCPSuK2D8Y.FjH48AQqr WwbfmZV06qPNjbDhCQgkK1qsUkrFnJlb_X6.hgOwhmnrsHllWtQ7JtjF8kjbogAEZ1iBI_PDp.uX _SQV5F1UG0_nLAiOhAK9LsK2NC38Qpfjg6Pfm1SESj.7qsX3LnEsb4TJMEV1rdXljsNHeeTToe72 chgF.fvT60SGs96_nWNbJpXOv2UVdXMVdSb6_VRPnONCk.0AJuwwcAapWLWK9sz30jHP0HPifABY nBHTQvs_tQsQtUSlm0xzROsDM6cG1JKDp9vVKbCePWcZSNfrH0PUg4scZ2TOlk0Tm9uiwyecnf8a DA3.4w9EDr3u00ecpHfdhkiMAECR3va3KwXmsHMiUPwzQlI3Jr26_ZdcHBKsDcoB7ugRB2G4s8Sg I0ZAYq4Dc.RlZAWdYxXCqifMy5ROV9V0I_UqoGx.1pQMF_2PubiLhoM86xi1GAJbwV.Ly1yEefXb TlqSYngVh8YZfelIpxtTvhZci4xO6BGPIFybKdb0P1VGaxCN8PdXcXjm.haEPIwIgy0uxSI0wAtp bu0ZFZbAVa5oVRUMgENmidNLRv7YlCwpEraPBmL5_._jsJSpcA13IEwDNGAJbEJ7EWdyMdEHRB_u XT.GlFN5_iBCRo_f97mB9Grr6_Oo3xSfFwkLC3V0M8sZCL8y9DFz3A_s739wvLGFkOUS9WDCldoM aIYeoWSjAuSMtAKrWfjBKjQRruCHJxK9cUTpPNfa3jiY2jsLzrkb39jalEYPWKzwBPByV55E3XUz ZSJ5_HAA4gzG_VU4QatPWVytTsTAN1dvUwaz1QBznAUYuTToFa8mqu8pZriu1VqlMNN.M4yAVozo zaqHYKRTUqeg8EgxiACCvPPBzcSIYseodCxSSW1xZArcDy5I3yx1Beagn4kPDcdil5iLvbPbHh32 t5LAVfZbrfLoUlLwGPrdcCOY0jn52f4GhnAqJpXNdHP6GNJtfcixU24QrlrLZ5pt7MWM.pwqQJsX _S8YGr0UziEP8PWP63aLfQ9G4nlVKNiU5dLNZBu024AM86iizt56YPnjg X-Sonic-MF: X-Sonic-ID: aa36731c-17ff-4e22-a1bf-6ed47e466002 Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Sat, 9 Aug 2025 13:07:12 +0000 Received: by hermes--production-sg3-cdfd77c9c-vj7sr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID fc4fa2a4f1d718d6837178d1db0f3adc; Sat, 09 Aug 2025 13:07:08 +0000 (UTC) From: Po Lu To: Eli Zaretskii Subject: Re: bug#79032: 30.1; Stylus (Wacom Pen) Support under Wayland In-Reply-To: <86zfc8lmua.fsf@gnu.org> References: <87o6tkcf11.fsf@uibk.ac.at> <86frewhyxn.fsf@gnu.org> <86pldn1gco.fsf@gnu.org> <86zfc8lmua.fsf@gnu.org> Date: Sat, 09 Aug 2025 21:07:02 +0800 Message-ID: <87ikiw8wzt.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.24260 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1475 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79032 Cc: 79032@debbugs.gnu.org, Justus-dev@Piater.name, waylandthrowaway@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Ping! Ping! Po Lu, please respond. Right, it appears that my e-mail has returned to normal. >> > This seems to imply that the stylus doesn't produce mouse-up events in >> > this case? Because otherwise, you should have seen events >> > as well. >> > >> > Po Lu, any ideas? Is this a known issue with Wayland? >> > >> > > This behavior makes it impossible to use the stylus for drawing inside >> > > Emacs, e.g. using artist-mode or el-easydraw >> > > (https://github.com/misohena/el-easydraw/issues/40). >> > > >> > > This behavior appears to be specific to Wayland, perhaps even to my >> > > compositor (swaywm). In particular, X (by default) appears to treat the >> > > stylus like the mouse: >> > > >> > > - xev (running under Xwayland) reports stylus interactions as mouse >> > > events, but wev reports stylus interactions as "zwp_tablet_tool_v2" >> > > events. >> > > >> > > - If I run Emacs under Xwayland (GDK_BACKEND=X11 emacs -Q), the stylus >> > > behaves identically to the mouse. >> > > >> > > Thus, for starters, it would be interesting if other Wayland users, >> > > using the same or different compositors, observe the same behavior. Do you observe the same phenomenon in other GTK 3 programs? I cursorily grepped for "zwp_tablet_tool_v2" in my copy of GTK 3's source code with no results, which means whatever support for tablets exists under PGTK is provided by your Wayland compositor.