Neither of the WMs I mentioned use GNOME Shell, but they do both
use
wlroots. Looking into this, it seems that any wlroots based
Wayland
compositor will use GDK_MOD4_MASK as Super. However, mutter
(GNOME's WM)
uses GDK_SUPER_MASK. Rebuilding emacs with the below patch seems
to have
fixed the issue. I'm not sure if there could be further
implications for
pgtk_emacs_to_gtk_modifiers.
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 2b04699fb3..d8ca89bbc0 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -5152,7 +5152,7 @@ pgtk_gtk_to_emacs_modifiers (struct
pgtk_display_info *dpyinfo, int state)
mod |= mod_ctrl;
if (state & GDK_META_MASK || state & GDK_MOD1_MASK)
mod |= mod_meta;
- if (state & GDK_SUPER_MASK)
+ if (state & GDK_SUPER_MASK || state & GDK_MOD4_MASK)
mod |= mod_super;
if (state & GDK_HYPER_MASK)
mod |= mod_hyper;
@@ -5285,7 +5285,7 @@ key_press_event (GtkWidget *widget,
GdkEvent *event, gpointer *user_data)
/* While super is pressed, the input method will always
always
resend the key events ignoring super. As a workaround,
don't
filter key events with super or hyper pressed. */
- if (!(event->key.state & (GDK_SUPER_MASK |
GDK_HYPER_MASK)))
+ if (!(event->key.state & (GDK_SUPER_MASK | GDK_HYPER_MASK
| GDK_MOD4_MASK)))
{
if (pgtk_im_filter_keypress (f, &event->key))
return TRUE;