From a897516fc5ec380938115ad42023f279d128fc1e Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 16 Sep 2022 15:24:19 +0300 Subject: [PATCH] Workaround gtk bug for superkey handling https://gitlab.gnome.org/GNOME/gtk/-/issues/4913 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55362 Patch based on Thomas Jost's suggestion. --- src/pgtkterm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 491ba33882..d5a9970693 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -5051,7 +5051,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; @@ -5184,7 +5184,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_MOD4_MASK | GDK_HYPER_MASK))) { if (pgtk_im_filter_keypress (f, &event->key)) return TRUE; @@ -5199,8 +5199,9 @@ key_press_event (GtkWidget *widget, GdkEvent *event, gpointer *user_data) /* make_lispy_event turns chars into control chars. Don't do it here because XLookupString is too eager. */ state &= ~GDK_CONTROL_MASK; - state &= ~(GDK_META_MASK - | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_MOD1_MASK); + state &= ~(GDK_META_MASK | GDK_MOD1_MASK + | GDK_SUPER_MASK | GDK_MOD4_MASK + | GDK_HYPER_MASK); nbytes = event->key.length; if (nbytes > copy_bufsiz) -- 2.37.3 83e4176a2d4b4d6e116aaa139ce000'>root/gnu.scm
AgeCommit message (Expand)Author
2020-07-25Use 'formatted-message' instead of '&message' where appropriate....* gnu.scm (%try-use-modules): Use 'formatted-message' instead of '&message'. * gnu/machine/digital-ocean.scm (maybe-raise-unsupported-configuration-error): Likewise. * gnu/machine/ssh.scm (machine-check-file-system-availability): Likewise. (machine-check-building-for-appropriate-system): Likewise. (deploy-managed-host): Likewise. (maybe-raise-unsupported-configuration-error): Likewise. * gnu/packages.scm (search-patch): Likewise. * gnu/services.scm (%service-with-default-value): Likewise. (files->etc-directory): Likewise. (fold-services): Likewise. * gnu/system.scm (locale-name->definition*): Likewise. * gnu/system/mapped-devices.scm (check-device-initrd-modules): Likewise. (check-luks-device): Likewise. * guix/channels.scm (latest-channel-instance): Likewise. * guix/cve.scm (json->cve-items): Likewise. * guix/git-authenticate.scm (commit-signing-key): Likewise. (commit-authorized-keys): Likewise. (authenticate-commit): Likewise. (verify-introductory-commit): Likewise. * guix/remote.scm (remote-pipe-for-gexp): Likewise. * guix/scripts/graph.scm (assert-package): Likewise. * guix/scripts/offload.scm (private-key-from-file*): Likewise. * guix/ssh.scm (authenticate-server*): Likewise. (open-ssh-session): Likewise. (remote-inferior): Likewise. * guix/ui.scm (matching-generations): Likewise. * guix/upstream.scm (package-update): Likewise. * tests/channels.scm ("latest-channel-instances, missing introduction for 'guix'"): Catch 'formatted-message?'. ("authenticate-channel, wrong first commit signer"): Likewise. * tests/lint.scm ("patches: not found"): Adjust message string. * tests/packages.scm ("patch not found yields a run-time error"): Catch 'formatted-message?'. * guix/lint.scm (check-patch-file-names): Handle 'formatted-message?'. (check-derivation): Ditto. Ludovic Courtès
2020-07-25utils: Move '&fix-hint' to (guix diagnostics)....* guix/utils.scm (&fix-hint): Move to... * guix/diagnostics.scm (&fix-hint): ... here. * gnu.scm: Adjust imports accordingly. * gnu/system/mapped-devices.scm: Likewise. * guix/channels.scm: Likewise. * guix/profiles.scm: Likewise. * guix/scripts/system/reconfigure.scm: Likewise. * guix/ssh.scm: Likewise. Ludovic Courtès
2020-07-25utils: Move <location> and '&error-location' to (guix diagnostics)....* guix/utils.scm (<location>, source-properties->location) (location->source-properties, &error-location): Move to... * guix/diagnostics.scm: ... here. * gnu.scm: Adjust imports accordingly. * gnu/machine.scm: Likewise. * gnu/system.scm: Likewise. * gnu/tests.scm: Likewise. * guix/inferior.scm: Likewise. * tests/channels.scm: Likewise. * tests/packages.scm: Likewise. Ludovic Courtès