Skip to content
Permalink
Browse files

GlobalShortcut_unix: request latest XInput 2 version by default.

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 956a8ca56b2ffc774ddf5ae3e0bb2d7b9a8a480c
Showing with 3 additions and 2 deletions.
  1. +2 −2 src/mumble/GlobalShortcut_unix.cpp
  2. +1 −0 src/mumble/GlobalShortcut_unix.h
@@ -91,8 +91,8 @@ GlobalShortcutX::GlobalShortcutX() {
int evt, error;

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

0 comments on commit 956a8ca

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