Merge remote-tracking branch 'whot/for-keith'

This commit is contained in:
Keith Packard 2012-01-09 11:40:23 -08:00
commit 0b2c6491c5
6 changed files with 16 additions and 12 deletions

View File

@ -706,7 +706,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient)
int int
XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len, int format, int mode, unsigned long len,
const pointer value, Bool sendevent) const void *value, Bool sendevent)
{ {
XIPropertyPtr prop; XIPropertyPtr prop;
int size_in_bytes; int size_in_bytes;

View File

@ -1292,14 +1292,17 @@ DeviceFocusEvents(DeviceIntPtr dev,
NotifyPointer); NotifyPointer);
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from);
/* next call catches the root too, if the screen changed */ /* next call catches the root too, if the screen changed */
DeviceFocusOutEvents(dev, from->parent, NullWindow, mode, DeviceFocusOutEvents(dev, from, NullWindow, mode,
NotifyNonlinearVirtual); NotifyNonlinearVirtual);
} }
/* Notify all the roots */ /* Notify all the roots */
for (i = 0; i < nscreens; i++) for (i = 0; i < nscreens; i++)
DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root); DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root);
if (to == PointerRootWin) if (to == PointerRootWin)
{
DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer); DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer);
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win);
}
} }
else else
{ {
@ -1321,7 +1324,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
if (IsParent(to, from)) if (IsParent(to, from))
{ {
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from);
DeviceFocusOutEvents(dev, from->parent, to, mode, DeviceFocusOutEvents(dev, from, to, mode,
NotifyVirtual); NotifyVirtual);
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to);
if ((IsParent(to, sprite->win)) && if ((IsParent(to, sprite->win)) &&
@ -1353,7 +1356,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
NotifyPointer); NotifyPointer);
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from);
if (from->parent != NullWindow) if (from->parent != NullWindow)
DeviceFocusOutEvents(dev, from->parent, common, mode, DeviceFocusOutEvents(dev, from, common, mode,
NotifyNonlinearVirtual); NotifyNonlinearVirtual);
if (to->parent != NullWindow) if (to->parent != NullWindow)
DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual); DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual);

View File

@ -1328,7 +1328,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
storeLastValuators(pDev, &mask, 0, 1, devx, devy); storeLastValuators(pDev, &mask, 0, 1, devx, devy);
/* Update the MD's co-ordinates, which are always in desktop space. */ /* 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); DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
master->last.valuators[0] = screenx; master->last.valuators[0] = screenx;
master->last.valuators[1] = screeny; master->last.valuators[1] = screeny;

View File

@ -970,15 +970,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
pInfo->attrs = DuplicateInputAttributes(attrs); pInfo->attrs = DuplicateInputAttributes(attrs);
} }
if (!pInfo->driver || !pInfo->name) { if (!pInfo->name) {
xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n"); xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n");
rval = BadRequest; rval = BadRequest;
goto unwind; goto unwind;
} }
if (!pInfo->name) { if (!pInfo->driver) {
xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n"); xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n");
rval = BadMatch; xf86Msg(X_INFO, "This device may have been added with another device file.\n");
rval = BadRequest;
goto unwind; goto unwind;
} }

View File

@ -92,7 +92,7 @@ extern _X_EXPORT int XIChangeDeviceProperty(
int /* format*/, int /* format*/,
int /* mode*/, int /* mode*/,
unsigned long /* len*/, unsigned long /* len*/,
const pointer /* value*/, const void* /* value*/,
Bool /* sendevent*/ Bool /* sendevent*/
); );

View File

@ -784,7 +784,7 @@ DeviceIntPtr kbd;
filter->active= 0; filter->active= 0;
return ((pMsg->flags&XkbSA_MessageGenKeyEvent)!=0); return ((pMsg->flags&XkbSA_MessageGenKeyEvent)!=0);
} }
return 0; return 1;
} }
static int static int