From 75953ccb9e9e5f1dbbaa44c714716a0049e22aae Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 3 Jan 2012 10:45:45 +1000 Subject: [PATCH 1/6] xfree86: split warning about missing identifier or input driver Check for identifier first and bail if it's missing (also remove the current identifier check after we've already bailed due to missing identifiers) If a driver is missing, warn but also say that we may have added this device already. I see too many bugreports with incorrectly shortened log files. Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois --- hw/xfree86/common/xf86Xinput.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 280a6ec93..fd40f28da 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -970,15 +970,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, pInfo->attrs = DuplicateInputAttributes(attrs); } - if (!pInfo->driver || !pInfo->name) { - xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n"); + if (!pInfo->name) { + xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n"); rval = BadRequest; goto unwind; } - if (!pInfo->name) { - xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n"); - rval = BadMatch; + if (!pInfo->driver) { + xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n"); + xf86Msg(X_INFO, "This device may have been added with another device file.\n"); + rval = BadRequest; goto unwind; } From a125aabda3a5cf27aa98cb61f16e49280b66f451 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Jan 2012 07:02:51 -0500 Subject: [PATCH 2/6] dix: send focus events to the immediate parent (#44079) For a transition from windows A to B, A->parent did not receive an event. DeviceFocusOutEvents sends to windows ]from, to[, so start with the actual window, not it's parent. X.Org Bug 44079 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Keith Packard --- dix/enterleave.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dix/enterleave.c b/dix/enterleave.c index a39e64001..2b8c7c5c3 100644 --- a/dix/enterleave.c +++ b/dix/enterleave.c @@ -1292,7 +1292,7 @@ DeviceFocusEvents(DeviceIntPtr dev, NotifyPointer); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); /* next call catches the root too, if the screen changed */ - DeviceFocusOutEvents(dev, from->parent, NullWindow, mode, + DeviceFocusOutEvents(dev, from, NullWindow, mode, NotifyNonlinearVirtual); } /* Notify all the roots */ @@ -1321,7 +1321,7 @@ DeviceFocusEvents(DeviceIntPtr dev, if (IsParent(to, from)) { DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from); - DeviceFocusOutEvents(dev, from->parent, to, mode, + DeviceFocusOutEvents(dev, from, to, mode, NotifyVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to); if ((IsParent(to, sprite->win)) && @@ -1353,7 +1353,7 @@ DeviceFocusEvents(DeviceIntPtr dev, NotifyPointer); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); if (from->parent != NullWindow) - DeviceFocusOutEvents(dev, from->parent, common, mode, + DeviceFocusOutEvents(dev, from, common, mode, NotifyNonlinearVirtual); if (to->parent != NullWindow) DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual); From 3ce102c362cadcd7087bdcf48440d9498eaf77d0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Jan 2012 07:08:01 -0500 Subject: [PATCH 3/6] dix: on PointerRootWin send a FocusIn to the sprite window too XTS XSetDeviceFocus-7 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas --- dix/enterleave.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dix/enterleave.c b/dix/enterleave.c index 2b8c7c5c3..89a82ab99 100644 --- a/dix/enterleave.c +++ b/dix/enterleave.c @@ -1299,7 +1299,10 @@ DeviceFocusEvents(DeviceIntPtr dev, for (i = 0; i < nscreens; i++) DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root); if (to == PointerRootWin) + { DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win); + } } else { From 223ba8b46eacbc8e573bc5136a3d6677f3e39099 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Jan 2012 15:55:04 +1000 Subject: [PATCH 4/6] dix: fix wrong condition checking for attached slave (#44003) We need to update the master if the device is not a master _and_ it is not floating. X.Org Bug 44003 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 3b40a5bb7..d0014e617 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1328,7 +1328,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, storeLastValuators(pDev, &mask, 0, 1, devx, devy); /* Update the MD's co-ordinates, which are always in desktop space. */ - if (!IsMaster(pDev) || !IsFloating(pDev)) { + if (!IsMaster(pDev) && !IsFloating(pDev)) { DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); master->last.valuators[0] = screenx; master->last.valuators[1] = screeny; From ed8f3c4bd17bddf1369d050ea8e63b9451d887ce Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Jan 2012 10:10:16 +1000 Subject: [PATCH 5/6] Xi: change XIChangeDeviceProperty from const pointer to const void * According to Daniel Kurtz, a typedef void *pointer is a atomic type. So a 'const pointer' is equivalent to 'void* const' instead of the intended 'const void*'. This technically changes the ABI, but we don't bump it for this. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas --- Xi/xiproperty.c | 2 +- include/exevents.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 88de11959..c612af22c 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -706,7 +706,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient) int XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, int format, int mode, unsigned long len, - const pointer value, Bool sendevent) + const void *value, Bool sendevent) { XIPropertyPtr prop; int size_in_bytes; diff --git a/include/exevents.h b/include/exevents.h index bd1697066..31acb30ea 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -92,7 +92,7 @@ extern _X_EXPORT int XIChangeDeviceProperty( int /* format*/, int /* mode*/, unsigned long /* len*/, - const pointer /* value*/, + const void* /* value*/, Bool /* sendevent*/ ); From 6b194365364cb7a74c2b19f4a8c5e0e0404339da Mon Sep 17 00:00:00 2001 From: Andreas Wettstein Date: Wed, 30 Nov 2011 20:20:21 +0100 Subject: [PATCH 6/6] xkb: Message actions suppress other key presses #28575 When a key to which a message action is mapped is held down, presses of other keys were not registered. Signed-off-by: Andreas Wettstein Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer --- xkb/xkbActions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 33864e16d..da0bdea69 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -784,7 +784,7 @@ DeviceIntPtr kbd; filter->active= 0; return ((pMsg->flags&XkbSA_MessageGenKeyEvent)!=0); } - return 0; + return 1; } static int