Skip to content

Commit

Permalink
GlobalShortcut_unix: request latest XInput 2 version by default.
Browse files Browse the repository at this point in the history
Previously, Mumble used to explicitly request XInput 2.0.

However, if apps such as Chrome (that use XInput 2.2, if possible)
were in the foreground, we would not properly receive raw release
events for mouse buttons.

Using the latest version (or, at least 2.2), seems to solve
the problem.

Fixes #1319
  • Loading branch information
mkrautz committed Nov 25, 2015
1 parent 58efe0c commit 956a8ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mumble/GlobalShortcut_unix.cpp
Expand Up @@ -91,8 +91,8 @@ GlobalShortcutX::GlobalShortcutX() {
int evt, error; int evt, error;


if (g.s.bEnableXInput2 && XQueryExtension(display, "XInputExtension", &iXIopcode, &evt, &error)) { if (g.s.bEnableXInput2 && XQueryExtension(display, "XInputExtension", &iXIopcode, &evt, &error)) {
int major = 2; int major = XI_2_Major;
int minor = 0; int minor = XI_2_Minor;
int rc = XIQueryVersion(display, &major, &minor); int rc = XIQueryVersion(display, &major, &minor);
if (rc != BadRequest) { if (rc != BadRequest) {
qWarning("GlobalShortcutX: Using XI2 %d.%d", major, minor); qWarning("GlobalShortcutX: Using XI2 %d.%d", major, minor);
Expand Down
1 change: 1 addition & 0 deletions src/mumble/GlobalShortcut_unix.h
Expand Up @@ -38,6 +38,7 @@
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#ifndef NO_XINPUT2 #ifndef NO_XINPUT2
#include <X11/extensions/XI2.h>
#include <X11/extensions/XInput2.h> #include <X11/extensions/XInput2.h>
#endif #endif
#include <X11/Xutil.h> #include <X11/Xutil.h>
Expand Down

0 comments on commit 956a8ca

Please sign in to comment.