emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PGTK-related misconceptions


From: Po Lu
Subject: Re: PGTK-related misconceptions
Date: Wed, 20 Apr 2022 16:25:11 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Trey Peacock <gpg@treypeacock.com> writes:

> 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.

First of all, the GDK_MODN_MASKs (aside from GDK_MOD1_MASK) are simply
not set on Broadway, the other GDK backend that we try to support.

Secondly, nothing is guaranteed about the behavior of the real modifier
masks after GDK_MOD1_MASK.  We cannot assume it means Super at all,
since it is not documented to mean that.  What if GDK changes its
meaning in the future?  Or the Wayland compositor developers?

I am not going to settle for non-solutions (or half-solutions) like what
you proposed, at least unless the GTK developers still haven't fixed
this by the time Emacs 29.1 is released.

> 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.

Nowhere in the documentation for GdkModifierType does it say that the
automatic mapping from real modifiers to virtual modifiers is
X11-specific, so this is clearly a GTK bug.  I'm pretty sure GTK
accelerators that specify <Super> as a modifier will not work on those
other Wayland compositors either, if what you say is true.

> 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.

I would still have made this change and then proceeded to ask someone
else to report a GTK bug.  I can't do that myself, since GNOME has been
persistently been making it more and more difficult to report bugs
without registering an account on whatever platform they currently use
for bug reports, and putting up with the associated e-mail spam.

But I don't use any other Wayland compositors, so that point is moot.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]