summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dix/events.c9
-rw-r--r--dix/getevents.c8
-rw-r--r--dix/ptrveloc.c2
-rw-r--r--hw/xfree86/common/xf86DGA.c10
-rw-r--r--hw/xfree86/common/xf86Events.c10
-rw-r--r--hw/xfree86/common/xf86Module.h2
-rw-r--r--hw/xfree86/common/xf86Option.c2
-rw-r--r--hw/xwin/winconfig.c2
-rw-r--r--mi/mieq.c6
-rw-r--r--render/animcur.c3
-rw-r--r--test/xi2/protocol-xiwarppointer.c2
-rw-r--r--xkb/xkbUtils.c10
12 files changed, 43 insertions, 23 deletions
diff --git a/dix/events.c b/dix/events.c
index a46aaf660..f72cdc7c4 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2238,7 +2238,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
* @return TRUE if the event should be discarded, FALSE otherwise.
*/
static BOOL
-FilterRawEvents(const ClientPtr client, const GrabPtr grab)
+FilterRawEvents(const ClientPtr client, const GrabPtr grab, WindowPtr root)
{
XIClientPtr client_xi_version;
int cmp;
@@ -2254,7 +2254,10 @@ FilterRawEvents(const ClientPtr client, const GrabPtr grab)
client_xi_version->minor_version, 2, 0);
/* XI 2.0: if device is grabbed, skip
XI 2.1: if device is grabbed by us, skip, we've already delivered */
- return (cmp == 0) ? TRUE : SameClient(grab, client);
+ if (cmp == 0)
+ return TRUE;
+
+ return (grab->window != root) ? FALSE : SameClient(grab, client);
}
/**
@@ -2307,7 +2310,7 @@ DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
*/
ic.next = NULL;
- if (!FilterRawEvents(rClient(&ic), grab))
+ if (!FilterRawEvents(rClient(&ic), grab, root))
DeliverEventToInputClients(device, &ic, root, xi, 1,
filter, NULL, &c, &m);
}
diff --git a/dix/getevents.c b/dix/getevents.c
index 3d41e1e5a..a1e193815 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1895,16 +1895,16 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (!mask_in ||
!valuator_mask_isset(mask_in, 0) ||
!valuator_mask_isset(mask_in, 1)) {
- ErrorF("%s: Attempted to start touch without x/y (driver bug)\n",
- dev->name);
+ ErrorFSigSafe("%s: Attempted to start touch without x/y "
+ "(driver bug)\n", dev->name);
return 0;
}
break;
case XI_TouchUpdate:
event->type = ET_TouchUpdate;
if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) {
- ErrorF("%s: TouchUpdate with no valuators? Driver bug\n",
- dev->name);
+ ErrorFSigSafe("%s: TouchUpdate with no valuators? Driver bug\n",
+ dev->name);
}
break;
case XI_TouchEnd:
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 338f415c5..c7994b03d 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -738,7 +738,7 @@ ApplyConstantDeceleration(DeviceVelocityPtr vel, double *fdx, double *fdy)
}
/*
- * compute the acceleration for given velocity and enforce min_acceleartion
+ * compute the acceleration for given velocity and enforce min_acceleration
*/
double
BasicComputeAcceleration(DeviceIntPtr dev,
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index c25a2747b..6a05ce536 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -1033,6 +1033,9 @@ DGAProcessKeyboardEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr keybd)
UpdateDeviceState(keybd, &ev);
+ if (!IsMaster(keybd))
+ return;
+
/*
* Deliver the DGA event
*/
@@ -1074,6 +1077,7 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
DeviceEvent ev = {
.header = ET_Internal,
.length = sizeof(ev),
+ .detail.key = event->detail,
.type = event->subtype,
.corestate = butc ? butc->state : 0
};
@@ -1083,6 +1087,9 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
UpdateDeviceState(mouse, &ev);
+ if (!IsMaster(mouse))
+ return;
+
/*
* Deliver the DGA event
*/
@@ -1190,9 +1197,6 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device)
if (!pScreenPriv)
return;
- if (!IsMaster(device))
- return;
-
switch (event->subtype) {
case KeyPress:
case KeyRelease:
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index d8d4fad9c..377e936f7 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -619,14 +619,16 @@ InputHandlerProc
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
{
static IHPtr handler = NULL;
- IHPtr old_handler = handler;
+ InputHandlerProc old_proc = NULL;
- if (old_handler)
- xf86RemoveGeneralHandler(old_handler);
+ if (handler) {
+ old_proc = handler->ihproc;
+ xf86RemoveGeneralHandler(handler);
+ }
handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
- return (old_handler) ? old_handler->ihproc : NULL;
+ return old_proc;
}
static void
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 1be7ba54d..e545c1498 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -81,7 +81,7 @@ typedef enum {
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(14, 1)
-#define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0)
+#define ABI_XINPUT_VERSION SET_ABI_VERSION(19, 0)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index c2ec79a53..40c9d15f4 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -515,7 +515,7 @@ ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p,
if (*s == '\0') {
if (markUsed) {
xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires an string value\n",
+ "Option \"%s\" requires a string value\n",
p->name);
}
p->found = FALSE;
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index 313320f1a..9e38113a5 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -762,7 +762,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p)
case OPTV_STRING:
if (*s == '\0') {
winDrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires an string value\n", p->name);
+ "Option \"%s\" requires a string value\n", p->name);
p->found = FALSE;
}
else {
diff --git a/mi/mieq.c b/mi/mieq.c
index 22f8c91bb..d7d73deb6 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -627,7 +627,11 @@ mieqProcessInputEvents(void)
mieqProcessDeviceEvent(dev, &event, screen);
/* Update the sprite now. Next event may be from different device. */
- if (event.any.type == ET_Motion && master)
+ if (master &&
+ (event.any.type == ET_Motion ||
+ ((event.any.type == ET_TouchBegin ||
+ event.any.type == ET_TouchUpdate) &&
+ event.device_event.flags & TOUCH_POINTER_EMULATED)))
miPointerUpdateSprite(dev);
#ifdef XQUARTZ
diff --git a/render/animcur.c b/render/animcur.c
index ebc5b8ef7..9cbba83fa 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -143,6 +143,8 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
Bool activeDevice = FALSE;
CARD32 now = 0, soonest = ~0; /* earliest time to wakeup again */
+ Unwrap(as, pScreen, BlockHandler);
+
for (dev = inputInfo.devices; dev; dev = dev->next) {
if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) {
if (!activeDevice) {
@@ -180,7 +182,6 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
if (activeDevice)
AdjustWaitForDelay(pTimeout, soonest - now);
- Unwrap(as, pScreen, BlockHandler);
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
if (activeDevice)
Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler);
diff --git a/test/xi2/protocol-xiwarppointer.c b/test/xi2/protocol-xiwarppointer.c
index 4bea333c3..f7986c1eb 100644
--- a/test/xi2/protocol-xiwarppointer.c
+++ b/test/xi2/protocol-xiwarppointer.c
@@ -68,7 +68,7 @@ __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
* This function overrides the one in the screen rec.
*/
static Bool
-ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen,
+ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr scr,
int x, int y, Bool generateEvent)
{
assert(x == expected_x);
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index c23cd7784..6c6af60f0 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -642,6 +642,7 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
CARD16 grp_mask;
XkbStatePtr state = &xkbi->state;
XkbCompatMapPtr map;
+ XkbControlsPtr ctrls;
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
return;
@@ -650,9 +651,14 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
grp_mask = map->groups[state->group].mask;
state->compat_state = state->mods | grp_mask;
state->compat_lookup_mods = state->lookup_mods | grp_mask;
+ ctrls= xkbi->desc->ctrls;
- if (xkbi->desc->ctrls->enabled_ctrls & XkbIgnoreGroupLockMask)
- grp_mask = map->groups[state->base_group].mask;
+ if (ctrls->enabled_ctrls & XkbIgnoreGroupLockMask) {
+ unsigned char grp = state->base_group+state->latched_group;
+ if (grp >= ctrls->num_groups)
+ grp = XkbAdjustGroup(XkbCharToInt(grp), ctrls);
+ grp_mask = map->groups[grp].mask;
+ }
state->compat_grab_mods = state->grab_mods | grp_mask;
return;
}