[brisk-menu] 02/02: debian/patches: Add 1005_prevent_super_key_swallows_on_compiz.patch. Prevent Superkey swallows on Compiz.

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Thu Mar 8 10:36:22 UTC 2018


This is an automated email from the git hooks/post-receive script.

flexiondotorg-guest pushed a commit to branch master
in repository brisk-menu.

commit f139e50dcf06984c55f3f1b150650b816112ff49
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date:   Thu Mar 8 11:36:12 2018 +0100

    debian/patches: Add 1005_prevent_super_key_swallows_on_compiz.patch. Prevent Superkey swallows on Compiz.
---
 ...1005_prevent_super_key_swallows_on_compiz.patch | 46 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 47 insertions(+)

diff --git a/debian/patches/1005_prevent_super_key_swallows_on_compiz.patch b/debian/patches/1005_prevent_super_key_swallows_on_compiz.patch
new file mode 100644
index 0000000..97caa9a
--- /dev/null
+++ b/debian/patches/1005_prevent_super_key_swallows_on_compiz.patch
@@ -0,0 +1,46 @@
+Author: Victor Kareh <vkareh at vkareh.net>
+Description: Prevent Super key swallows on Compiz
+
+diff --git a/src/lib/key-binder.c b/src/lib/key-binder.c
+index bd82470..d639c71 100644
+--- a/src/lib/key-binder.c
++++ b/src/lib/key-binder.c
+@@ -168,30 +168,27 @@ static GdkFilterReturn brisk_key_binder_filter(GdkXEvent *xevent, GdkEvent *even
+ 
+         /* Find a matching binding */
+         while (g_hash_table_iter_next(&iter, (void **)&key, (void **)&binding)) {
+-                /* capture initial key press */
+-                if (xev->xkey.keycode == binding->keycode && xev->type == KeyPress &&
++                if (xev->type == KeyPress && xev->xkey.keycode == binding->keycode &&
+                     !self->wait_for_release) {
++                        /* capture initial key press */
+                         if (mods == binding->mods) {
+                                 self->wait_for_release = TRUE;
+-                                XAllowEvents(display, AsyncKeyboard, xev->xkey.time);
+                         }
+-                } else if (xev->xkey.keycode == binding->keycode && self->wait_for_release) {
++                } else if (xev->type == KeyRelease && xev->xkey.keycode == binding->keycode &&
++                           self->wait_for_release) {
+                         /* capture release within same shortcut sequence */
+-                        if (xev->type == KeyRelease) {
+-                                self->wait_for_release = FALSE;
+-                                binding->func(event, binding->udata);
+-                        }
+-                        XAllowEvents(display, AsyncKeyboard, xev->xkey.time);
++                        binding->func(event, binding->udata);
++                        self->wait_for_release = FALSE;
+                 } else {
++                        XUngrabKeyboard(display, xev->xkey.time);
+                         /* when breaking the shortcut sequence, send the event up the window
+                          * hierarchy in case it's part of a different shortcut sequence
+                          * (e.g. <Mod4>a) */
+                         XSendEvent(display,
+-                                   GDK_WINDOW_XID(self->root_window),
++                                   xev->xkey.window,
+                                    TRUE,
+                                    KeyPressMask | KeyReleaseMask,
+                                    xev);
+-                        XAllowEvents(display, ReplayKeyboard, xev->xkey.time);
+                         self->wait_for_release = FALSE;
+                 }
+         }
diff --git a/debian/patches/series b/debian/patches/series
index 10daa59..ab5d0b4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 1002_fix-build-against-old-GLib.patch
 1003_dash_launcher.patch
 1004_fix_dash_styling_for_some_light_themes.patch
+1005_prevent_super_key_swallows_on_compiz.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/brisk-menu.git



More information about the pkg-mate-commits mailing list