aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xnest/Keyboard.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-02-22 21:39:56 +0100
committermarha <marha@users.sourceforge.net>2015-02-22 21:39:56 +0100
commit462f18c7b25fe3e467f837647d07ab0a78aa8d2b (patch)
treefc8013c0a1bac05a1945846c1697e973f4c35013 /xorg-server/hw/xnest/Keyboard.c
parent36f711ee12b6dd5184198abed3aa551efb585587 (diff)
downloadvcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.gz
vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.bz2
vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.zip
Merged origin/release (checked in because wanted to merge new stuff)
Diffstat (limited to 'xorg-server/hw/xnest/Keyboard.c')
-rw-r--r--xorg-server/hw/xnest/Keyboard.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xorg-server/hw/xnest/Keyboard.c b/xorg-server/hw/xnest/Keyboard.c
index 2cf16246b..ee3f68e3f 100644
--- a/xorg-server/hw/xnest/Keyboard.c
+++ b/xorg-server/hw/xnest/Keyboard.c
@@ -18,6 +18,7 @@ is" without express or implied warranty.
#include <X11/X.h>
#include <X11/Xproto.h>
+#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
#include "screenint.h"
#include "inputstr.h"
@@ -247,7 +248,11 @@ xnestUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
- if (key_is_down(pDev, key, KEY_PROCESSED))
+ if (mask == XCB_MOD_MASK_LOCK) {
+ xnestQueueKeyEvent(KeyPress, key);
+ xnestQueueKeyEvent(KeyRelease, key);
+ }
+ else if (key_is_down(pDev, key, KEY_PROCESSED))
xnestQueueKeyEvent(KeyRelease, key);
if (--count == 0)
@@ -261,6 +266,8 @@ xnestUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
xnestQueueKeyEvent(KeyPress, key);
+ if (mask == XCB_MOD_MASK_LOCK)
+ xnestQueueKeyEvent(KeyRelease, key);
break;
}
}