<!DOCTYPE html>
<html lang='en'>
<head>
<title>guix - Wojtek's customized Guix</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/better-cgit-markdown-heading-color.css'/>
<link rel='shortcut icon' href='/cgit-static/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.koszko.org/guix/atom/gnu/packages/patches/ghc-testsuite-dlopen-pie.patch?h=koszko' type='application/atom+xml'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='https://git.koszko.org/cgit-static/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/guix/'>guix</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='852c75a125273f4d3c3e540497f3b5e825468362'/><select name='h' onchange='this.form.submit();'>
<option value='koszko' selected='selected'>koszko</option>
<option value='koszko-scripts'>koszko-scripts</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Wo</td></tr></table>
<table class='tabs'><tr><td>
<a class='active' href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=852c75a125273f4d3c3e540497f3b5e825468362'>refs</a><a href='/guix/log/'>log</a><a href='/guix/tree/?id=852c75a125273f4d3c3e540497f3b5e825468362'>tree</a><a href='/guix/commit/?id=852c75a125273f4d3c3e540497f3b5e825468362'>commit</a><a href='/guix/diff/?id=852c75a125273f4d3c3e540497f3b5e825468362'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/'>
<input type='hidden' name='id' value='852c75a125273f4d3c3e540497f3b5e825468362'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='content'><div id='summary'><pre>
From a897516fc5ec380938115ad42023f279d128fc1e Mon Sep 17 00:00:00 2001
From: Andrew Tropin &lt;andrew@trop.in&gt;
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&apos;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 &amp; GDK_META_MASK || state &amp; GDK_MOD1_MASK)
     mod |= mod_meta;
-  if (state &amp; GDK_SUPER_MASK)
+  if (state &amp; GDK_SUPER_MASK || state &amp; GDK_MOD4_MASK)
     mod |= mod_super;
   if (state &amp; 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&apos;t
 	 filter key events with super or hyper pressed.  */
-      if (!(event-&gt;key.state &amp; (GDK_SUPER_MASK | GDK_HYPER_MASK)))
+      if (!(event-&gt;key.state &amp; (GDK_SUPER_MASK | GDK_MOD4_MASK | GDK_HYPER_MASK)))
 	{
 	  if (pgtk_im_filter_keypress (f, &amp;event-&gt;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&apos;t do it here because XLookupString is too eager.  */
       state &amp;= ~GDK_CONTROL_MASK;
-      state &amp;= ~(GDK_META_MASK
-		 | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_MOD1_MASK);
+      state &amp;= ~(GDK_META_MASK | GDK_MOD1_MASK
+		 | GDK_SUPER_MASK | GDK_MOD4_MASK
+		 | GDK_HYPER_MASK);
 
       nbytes = event-&gt;key.length;
       if (nbytes &gt; copy_bufsiz)
-- 
2.37.3
</pre>
</div></div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
