summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-01-10 14:51:57 +1300
committerKeith Packard <keithp@keithp.com>2015-01-10 14:51:57 +1300
commit5f2e8ac51ccbf7c02f25c8cb7617df0238418cd1 (patch)
treefa7b56cdbbfefbfcf84fb9ab2e66d21dc319a46d
parent4e12d7b6f4489fa06475465993a3e1e1d896390b (diff)
parent43014795087a0a8774dd9687f5967329b15f06a2 (diff)
Merge remote-tracking branch 'whot/for-keith'
-rw-r--r--Xi/exevents.c5
-rw-r--r--hw/kdrive/ephyr/ephyr.c8
-rw-r--r--hw/xnest/Keyboard.c9
3 files changed, 18 insertions, 4 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index b0bc47e6d..0857bcee6 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1403,7 +1403,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (grab->ownerEvents) {
WindowPtr focus = NullWindow;
- WindowPtr sprite_win = dev->spriteInfo->sprite->win;
+ WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite);
deliveries = DeliverDeviceEvents(sprite_win, ptrev, grab, focus, dev);
}
@@ -1429,8 +1429,9 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
}
else {
GrabPtr devgrab = dev->deviceGrab.grab;
+ WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite);
- DeliverDeviceEvents(win, ptrev, grab, win, dev);
+ DeliverDeviceEvents(sprite_win, ptrev, grab, win, dev);
/* FIXME: bad hack
* Implicit passive grab activated in response to this event. Store
* the event.
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 907bbebae..164ebdcba 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -806,7 +806,11 @@ ephyrUpdateModifierState(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) {
+ KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE);
+ KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE);
+ }
+ else if (key_is_down(pDev, key, KEY_PROCESSED))
KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE);
if (--count == 0)
@@ -820,6 +824,8 @@ ephyrUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE);
+ if (mask == XCB_MOD_MASK_LOCK)
+ KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE);
break;
}
}
diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c
index 2cf16246b..ee3f68e3f 100644
--- a/hw/xnest/Keyboard.c
+++ b/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;
}
}