summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-06-26 15:40:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-06-26 15:41:22 +0200
commitfddb2376270b48581a780849838c3b20f81c0b77 (patch)
tree8d90f6500cc73d6c28f7012971e6fac29c25eedc
parent7ee91f240cf51b94fdeed332a69da99c59ecd215 (diff)
qxt-mini: fix typo (code -> native_code)
Also, all mods need to be unbound in case of grabKey() failure
-rw-r--r--qxt-mini/qxtglobalshortcut_x11.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/qxt-mini/qxtglobalshortcut_x11.cpp b/qxt-mini/qxtglobalshortcut_x11.cpp
index a37b1b0b..2c5e8f2a 100644
--- a/qxt-mini/qxtglobalshortcut_x11.cpp
+++ b/qxt-mini/qxtglobalshortcut_x11.cpp
@@ -179,7 +179,15 @@ public:
if (errorHandler.error)
{
qDebug() << "qxt-mini: error while binding to" << code << mods;
- ungrabKey(code, mods);
+ for (const auto& set : evil_mods.sets())
+ {
+ quint32 m = mods;
+
+ for (int value : set)
+ m |= (unsigned)value;
+
+ XUngrabKey(display(), native_code, m, rootWindow());
+ }
ret = false;
}
}
@@ -210,7 +218,7 @@ public:
for (int value : set)
m |= (unsigned)value;
- XUngrabKey(display(), code, m, rootWindow());
+ XUngrabKey(display(), native_code, m, rootWindow());
}
if (errorHandler.error)