all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
@ 2022-01-12  4:56 Campbell Barton
  2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 more replies)
  0 siblings, 3 replies; 56+ messages in thread
From: Campbell Barton @ 2022-01-12  4:56 UTC (permalink / raw)
  To: 53200

With PGTK enabled (--with-pgtk) the following occurs:

- Press C-S-u
- Press a

The character 'a' is entered.

Without PGTK enabled, the following occurs:

- Press C-S-u
- Press a

The character 'aaaa' is entered 4x.

Note that PGTK seems to swallow this binding, since it's not possible to
check what the shortcut does by pressing:

C-H, K, C-S-u

Which reports without PGTK: (universal-argument)



In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.31, cairo version 1.17.4)
 of 2022-01-12 built on austpc
Repository revision: 8555a3e1ed1d34cbaa172bde86eb3b11a1cd7940
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --prefix=/opt/emacs --with-sound=no --disable-acl
 --with-file-notification=no --with-xpm --with-native-compilation
 --with-jpeg --with-tiff --with-gif --with-png --without-rsvg
 --without-lcms2 --without-libsystemd --without-gsettings
 --without-harfbuzz --without-m17n-flt --without-libotf --without-gpm
 --without-dbus --without-gsettings --without-gconf --without-selinux
 --without-gnutls --with-pgtk --without-makeinfo --without-libgmp
 --with-zlib --with-compress-install --with-threads
 --without-toolkit-scroll-bars --with-x-toolkit=gtk3 --with-xft
 --with-modules 'CFLAGS=-O3 -mtune=native -march=native -pipe
 -fomit-frame-pointer''

Configured features:
CAIRO FREETYPE GIF GLIB JPEG JSON LIBXML2 MODULES NATIVE_COMP PDUMPER
PGTK PNG SECCOMP SQLITE3 THREADS TIFF WEBP XIM GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  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
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date seq gv
subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win
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 cl-generic
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 simple abbrev obarray
cl-preloaded nadvice button 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
dynamic-setting font-render-setting cairo move-toolbar gtk x-toolkit
pgtk multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 45508 6842)
 (symbols 48 5609 1)
 (strings 32 18557 3267)
 (string-bytes 1 622864)
 (vectors 16 10816)
 (vector-slots 8 157953 15748)
 (floats 8 25 28)
 (intervals 56 255 0)
 (buffers 992 11))





^ permalink raw reply	[flat|nested] 56+ messages in thread
* Re: PGTK-related misconceptions
@ 2022-04-18 21:50 Trey
  2022-04-19  0:59 ` Po Lu
  0 siblings, 1 reply; 56+ messages in thread
From: Trey @ 2022-04-18 21:50 UTC (permalink / raw)
  To: Po Lu; +Cc: Morgan Smith, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 925 bytes --]

Po Lu <luangruo@yahoo.com> writes:

> Morgan Smith <morgan.j.smith@outlook.com> writes:
>
>> I'd like to report that my super key stopped registering.  I suspected
>> commit 1404e16975 caused it so I did a quick `git revert 1404e16975`
>> ontop of 807682de1e and that fixed it.
>
> Crystal ball says you are using X Windows, and have to put
>
>   remove mod4 = Hyper_L
>
> in your ~/.Xmodmap file, because GTK doesn't try as hard as regular X11
> Emacs to work around the common kind of virtual modifier
> misconfiguration.
>

I'm experiencing the same issue here. My super key no longer registers,
even using emacs -Q. However, I find it begins from the commit changing
to GDK modifier masks 1c1ae6ba802cc5813fa6f8f90f21050aae6bb459. I've
tested this with the following specs:

WMs: River & Sway
Emacs Version: Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.17.6) of 2022-04-18


--
Trey

[-- Attachment #1.2: publickey - gpg@treypeacock.com - da008078.asc --]
[-- Type: application/pgp-keys, Size: 1339 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 56+ messages in thread
* Re: PGTK-related misconceptions
@ 2022-04-20  7:52 Trey Peacock
  2022-04-20  8:25 ` Po Lu
  0 siblings, 1 reply; 56+ messages in thread
From: Trey Peacock @ 2022-04-20  7:52 UTC (permalink / raw)
  To: Po Lu; +Cc: Morgan Smith, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 3202 bytes --]

"Po Lu" <luangruo@yahoo.com> writes:

> Trey Peacock <gpg@treypeacock.com> writes:
>
>>> See https://docs.gtk.org/gdk3/flags.ModifierType.html, which says:
>>>
>>>   Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are
>>>   mapped to Mod2 - Mod5, and indicates this by setting GDK_SUPER_MASK,
>>>   GDK_HYPER_MASK or GDK_META_MASK in the state field of key events.
>>
>> The capability to do something is not the same as a requirement.
>
> It's the documented behavior of GDK, and Emacs holds GDK to its
> documentation.  Nowhere does the documentation say this is a
> "capability", "recognizes" is in the third-person present tense, which
> makes it a requirement.
>
>> I would be happy to help. Granted, this is only my second interaction on
>> the mailing list, but I do want to contribute how I can.
>
> Great, one step forward would be to bring up the issue with either the
> GTK or Wayland compositor developers.  Since you've already talked with
> the latter, and they say it's not their problem, please contact the
> former.
>
>> It is not GDK that is responsible for this. Further, since this is not
>> required, I don't think its proper to deem it a bug.
>
> It is, as specified in its documentation.
>
>> Your change seems to have removed a fallback in case there were no
>> virtual modifiers and reverses the previous logic:
>
> As you can see by the name of the function, it was directly ported over
> from X (the current version is in xterm.c), and is yet another example
> of the PGTK port translating X Windows code to GDK verbatim, duplicating
> what GDK is supposed to do itself.
>
> I will not change Emacs because the GTK developers, yet again, forgot to
> follow their own documentation when implementing some feature.  It just
> makes Emacs code bloated, hard-to-follow and liable to break at the
> slightest whim of the GTK developers, who then respond that we're not
> using GTK "properly", because we try to work around their problems.

You have already changed Emacs from accepting both MOD4 and SUPER_MASK
as its Super key modifiers to only accepting SUPER_MASK. I imagine this
response is born of more than just this issue but I would not let it
cloud an easy solution.

GTK 3.24.33 still accepts Mod2-5 masks, recognizes them separately from
the virtual modifier masks, and unlike the x11 implementation does not
contain the logic to set convert Super_L or Super_R to GDK_SUPER_MASK.
So what you have done is actually held Emacs to GDK's x11
implementation and documentation rather than looking at the code itself.

https://gitlab.gnome.org/GNOME/gtk/-/blob/3.24.33/gdk/wayland/gdkkeys-wayland.c#L249-316
https://gitlab.gnome.org/GNOME/gtk/-/blob/3.24.33/gdk/x11/gdkkeys-x11.c#L396-398

If the PGTK branch is meant for "alternative window systems available on
GNU/Linux and some Unix systems, such as Wayland" then I do think there
should be more consideration taken compositors that do not share
Mutter's workaround. Had you been using any other compositor, surely you
would not have made this change. Perhaps even filing a bug yourself.

This will be my last comment on the matter as I don't think its
productive for either of us to belabor our points.

[-- Attachment #1.2: publickey - gpg@treypeacock.com - da008078.asc --]
[-- Type: application/pgp-keys, Size: 1339 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2022-07-30  0:58 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-12  4:56 bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable Campbell Barton
2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-13  7:08   ` Lars Ingebrigtsen
2022-01-13  8:04     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15  2:01 ` Morgan Smith
2022-04-15  2:29   ` PGTK-related misconceptions Po Lu
2022-04-15  7:11     ` Byung-Hee HWANG
2022-04-15 16:24     ` Eric Abrahamsen
2022-04-18  5:18     ` Sean Whitton
2022-04-18  5:31       ` Po Lu
2022-04-18  5:43         ` Sean Whitton
2022-04-18  5:57           ` Po Lu
2022-04-18 18:27             ` Sean Whitton
2022-04-18 19:49             ` Jim Porter
2022-04-19  1:02               ` Po Lu
2022-04-19  2:46                 ` Sean Whitton
2022-04-19  2:18               ` Tim Cross
2022-04-19  5:56                 ` Eli Zaretskii
2022-04-19  8:13                   ` Tim Cross
2022-04-19 10:32                     ` Eli Zaretskii
2022-04-19  9:10     ` Dirk-Jan C. Binnema
2022-04-19 10:42       ` Po Lu
2022-04-19 11:53       ` Phil Sainty
2022-04-19 13:58         ` Sean Whitton
2022-04-20  3:29           ` Phil Sainty
2022-04-20  4:48             ` Stefan Monnier
2022-04-19 16:51         ` Yuri Khan
2022-04-22  5:44           ` Pankaj Jangid
2022-05-22 16:25 ` bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable daanturo
2022-05-22 17:44   ` Morgan Smith
2022-05-23  0:55     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  -- strict thread matches above, loose matches on Subject: below --
2022-04-18 21:50 PGTK-related misconceptions Trey
2022-04-19  0:59 ` Po Lu
2022-04-19  3:28   ` Trey Peacock
2022-04-19  4:27     ` Po Lu
2022-04-19 23:02       ` Trey Peacock
2022-04-20  0:48         ` Po Lu
2022-04-20  2:33           ` Trey Peacock
2022-04-20  4:05             ` Po Lu
2022-07-25 21:18     ` Akira Kyle
2022-07-26  2:08       ` Po Lu
2022-07-26 12:10         ` Lars Ingebrigtsen
2022-07-26 12:35           ` Po Lu
2022-07-29 14:26             ` Stefan Monnier
2022-07-30  0:58               ` Po Lu
2022-07-26 21:36         ` Akira Kyle
2022-07-27  2:48           ` Po Lu
2022-07-27  8:34             ` Trey Peacock
2022-07-27  9:10               ` Po Lu
2022-07-27 13:45                 ` Trey Peacock
2022-07-27 13:52                   ` Po Lu
2022-07-28  1:39             ` Akira Kyle
2022-07-28  2:50               ` Po Lu
2022-04-20  7:52 Trey Peacock
2022-04-20  8:25 ` Po Lu
2022-04-20 13:13   ` Brian Cully

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.