summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/detect.py2
-rw-r--r--platform/x11/os_x11.cpp13
2 files changed, 14 insertions, 1 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 356de7b2bc..ba232f6d4e 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -155,7 +155,7 @@ def configure(env):
if os.system("pkg-config --exists alsa")==0:
print("Enabling ALSA")
env.Append(CPPFLAGS=["-DALSA_ENABLED"])
- env.Append(LIBS=['asound'])
+ env.ParseConfig('pkg-config alsa --cflags --libs')
else:
print("ALSA libraries not found, disabling driver")
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 9a2d610e78..5f1ab5b4aa 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1176,6 +1176,19 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
event.key.mod.shift=true;
}
+ //don't set mod state if modifier keys are released by themselves
+ //else event.is_action() will not work correctly here
+ if (!event.key.pressed) {
+ if (event.key.scancode == KEY_SHIFT)
+ event.key.mod.shift = false;
+ else if (event.key.scancode == KEY_CONTROL)
+ event.key.mod.control = false;
+ else if (event.key.scancode == KEY_ALT)
+ event.key.mod.alt = false;
+ else if (event.key.scancode == KEY_META)
+ event.key.mod.meta = false;
+ }
+
//printf("key: %x\n",event.key.scancode);
input->parse_input_event( event);
}