Skip to content
Permalink
Browse files

GlobalShortcut_unix, Settings: disable XInput2 by default.

A temporary (we hope!) workaround for:

  #1319

Can be re-enabled by adding:

    [shortcut/x11/xinput2]
    enable = true

to $HOME/.config/Mumble/Mumble.conf
  • Loading branch information...
mkrautz committed Nov 24, 2015
1 parent c52d1a3 commit 58efe0c5e936c6b6171ff5cae0d51a336d11a200
Showing with 5 additions and 1 deletion.
  1. +1 −1 src/mumble/GlobalShortcut_unix.cpp
  2. +3 −0 src/mumble/Settings.cpp
  3. +1 −0 src/mumble/Settings.h
@@ -90,7 +90,7 @@ GlobalShortcutX::GlobalShortcutX() {
#ifndef NO_XINPUT2
int evt, error;

if (XQueryExtension(display, "XInputExtension", &iXIopcode, &evt, &error)) {
if (g.s.bEnableXInput2 && XQueryExtension(display, "XInputExtension", &iXIopcode, &evt, &error)) {
int major = 2;
int minor = 0;
int rc = XIQueryVersion(display, &major, &minor);
@@ -412,6 +412,7 @@ Settings::Settings() {
bShortcutEnable = true;
bSuppressMacEventTapWarning = false;
bEnableEvdev = false;
bEnableXInput2 = false;
bEnableGKey = true;

for (int i=Log::firstMsgType; i<=Log::lastMsgType; ++i) {
@@ -737,6 +738,7 @@ void Settings::load(QSettings* settings_ptr) {
SAVELOAD(bShortcutEnable, "shortcut/enable");
SAVELOAD(bSuppressMacEventTapWarning, "shortcut/mac/suppresswarning");
SAVELOAD(bEnableEvdev, "shortcut/linux/evdev/enable");
SAVELOAD(bEnableXInput2, "shortcut/x11/xinput2/enable");
SAVELOAD(bEnableGKey, "shortcut/gkey");

int nshorts = settings_ptr->beginReadArray(QLatin1String("shortcuts"));
@@ -1040,6 +1042,7 @@ void Settings::save() {
SAVELOAD(bShortcutEnable, "shortcut/enable");
SAVELOAD(bSuppressMacEventTapWarning, "shortcut/mac/suppresswarning");
SAVELOAD(bEnableEvdev, "shortcut/linux/evdev/enable");
SAVELOAD(bEnableXInput2, "shortcut/x11/xinput2/enable");

settings_ptr->beginWriteArray(QLatin1String("shortcuts"));
int idx = 0;
@@ -243,6 +243,7 @@ struct Settings {
bool bShortcutEnable;
bool bSuppressMacEventTapWarning;
bool bEnableEvdev;
bool bEnableXInput2;
bool bEnableGKey;
QList<Shortcut> qlShortcuts;

0 comments on commit 58efe0c

Please sign in to comment.
You can’t perform that action at this time.