Merge remote-tracking branch 'whot/for-keith'
This commit is contained in:
commit
bfa2a1857a
|
@ -337,7 +337,7 @@ static int
|
||||||
SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
|
SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
|
||||||
int size, int count)
|
int size, int count)
|
||||||
{
|
{
|
||||||
int rc, k, n, pos = 0;
|
int rc, k, pos = 0;
|
||||||
SELinuxListItemsReply rep;
|
SELinuxListItemsReply rep;
|
||||||
CARD32 *buf;
|
CARD32 *buf;
|
||||||
|
|
||||||
|
@ -526,11 +526,6 @@ ProcSELinuxDispatch(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcSELinuxQueryVersion(ClientPtr client)
|
SProcSELinuxQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxQueryVersionReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxQueryVersionReq);
|
|
||||||
swaps(&stuff->client_major);
|
|
||||||
swaps(&stuff->client_minor);
|
|
||||||
return ProcSELinuxQueryVersion(client);
|
return ProcSELinuxQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ int
|
||||||
XIShouldNotify(ClientPtr client, DeviceIntPtr dev)
|
XIShouldNotify(ClientPtr client, DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
DeviceIntPtr current_ptr = PickPointer(client);
|
DeviceIntPtr current_ptr = PickPointer(client);
|
||||||
DeviceIntPtr current_kbd = GetPairedDevice(current_ptr);
|
DeviceIntPtr current_kbd = GetMaster(current_ptr, KEYBOARD_OR_FLOAT);
|
||||||
|
|
||||||
if (dev == current_kbd || dev == current_ptr)
|
if (dev == current_kbd || dev == current_ptr)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -903,13 +903,13 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
|
|
||||||
if (IsPointerDevice(device))
|
if (IsPointerDevice(device))
|
||||||
{
|
{
|
||||||
kbd = GetPairedDevice(device);
|
kbd = GetMaster(device, KEYBOARD_OR_FLOAT);
|
||||||
mouse = device;
|
mouse = device;
|
||||||
if (!kbd->key) /* can happen with floating SDs */
|
if (!kbd->key) /* can happen with floating SDs */
|
||||||
kbd = NULL;
|
kbd = NULL;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
mouse = GetPairedDevice(device);
|
mouse = GetMaster(device, POINTER_OR_FLOAT);
|
||||||
kbd = device;
|
kbd = device;
|
||||||
if (!mouse->valuator || !mouse->button) /* may be float. SDs */
|
if (!mouse->valuator || !mouse->button) /* may be float. SDs */
|
||||||
mouse = NULL;
|
mouse = NULL;
|
||||||
|
@ -1495,7 +1495,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
|
||||||
rc = CheckGrabValues(client, param);
|
rc = CheckGrabValues(client, param);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
if (k == NULL)
|
if ((dev->id != XIAllDevices && dev->id != XIAllMasterDevices) && k == NULL)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
if (grabtype == GRABTYPE_XI)
|
if (grabtype == GRABTYPE_XI)
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,7 @@ ProcXIQueryPointer(ClientPtr client)
|
||||||
MaybeStopHint(pDev, client);
|
MaybeStopHint(pDev, client);
|
||||||
|
|
||||||
if (IsMaster(pDev))
|
if (IsMaster(pDev))
|
||||||
kbd = GetPairedDevice(pDev);
|
kbd = GetMaster(pDev, MASTER_KEYBOARD);
|
||||||
else
|
else
|
||||||
kbd = (pDev->key) ? pDev : NULL;
|
kbd = (pDev->key) ? pDev : NULL;
|
||||||
|
|
||||||
|
|
|
@ -766,7 +766,7 @@ CoreFocusOutNotifyPointerEvents(DeviceIntPtr dev,
|
||||||
{
|
{
|
||||||
WindowPtr P, stopAt;
|
WindowPtr P, stopAt;
|
||||||
|
|
||||||
P = PointerWin(GetPairedDevice(dev));
|
P = PointerWin(GetMaster(dev, POINTER_OR_FLOAT));
|
||||||
|
|
||||||
if (!P)
|
if (!P)
|
||||||
return;
|
return;
|
||||||
|
@ -821,7 +821,7 @@ CoreFocusInNotifyPointerEvents(DeviceIntPtr dev,
|
||||||
{
|
{
|
||||||
WindowPtr P;
|
WindowPtr P;
|
||||||
|
|
||||||
P = PointerWin(GetPairedDevice(dev));
|
P = PointerWin(GetMaster(dev, POINTER_OR_FLOAT));
|
||||||
|
|
||||||
if (!P || P == exclude || (pwin_parent != P && !IsParent(pwin_parent, P)))
|
if (!P || P == exclude || (pwin_parent != P && !IsParent(pwin_parent, P)))
|
||||||
return;
|
return;
|
||||||
|
@ -1087,7 +1087,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
{
|
{
|
||||||
root = screenInfo.screens[i]->root;
|
root = screenInfo.screens[i]->root;
|
||||||
if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root))
|
if (!HasOtherPointer(root, GetMaster(dev, POINTER_OR_FLOAT)) && !FirstFocusChild(root))
|
||||||
{
|
{
|
||||||
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
||||||
* the pointer paired with dev is below the current root window,
|
* the pointer paired with dev is below the current root window,
|
||||||
|
@ -1095,7 +1095,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
|
||||||
if (dev->focus && dev->focus->win == PointerRootWin &&
|
if (dev->focus && dev->focus->win == PointerRootWin &&
|
||||||
B != PointerRootWin)
|
B != PointerRootWin)
|
||||||
{
|
{
|
||||||
WindowPtr ptrwin = PointerWin(GetPairedDevice(dev));
|
WindowPtr ptrwin = PointerWin(GetMaster(dev, POINTER_OR_FLOAT));
|
||||||
if (ptrwin && IsParent(root, ptrwin))
|
if (ptrwin && IsParent(root, ptrwin))
|
||||||
CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE);
|
CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE);
|
||||||
}
|
}
|
||||||
|
@ -1187,7 +1187,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev,
|
||||||
if (dev->focus && dev->focus->win == PointerRootWin &&
|
if (dev->focus && dev->focus->win == PointerRootWin &&
|
||||||
B != PointerRootWin)
|
B != PointerRootWin)
|
||||||
{
|
{
|
||||||
WindowPtr ptrwin = PointerWin(GetPairedDevice(dev));
|
WindowPtr ptrwin = PointerWin(GetMaster(dev, POINTER_OR_FLOAT));
|
||||||
if (ptrwin)
|
if (ptrwin)
|
||||||
CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE);
|
CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE);
|
||||||
}
|
}
|
||||||
|
|
23
dix/events.c
23
dix/events.c
|
@ -3698,10 +3698,7 @@ CheckPassiveGrabsOnWindow(
|
||||||
gdev= grab->modifierDevice;
|
gdev= grab->modifierDevice;
|
||||||
if (grab->grabtype == GRABTYPE_CORE)
|
if (grab->grabtype == GRABTYPE_CORE)
|
||||||
{
|
{
|
||||||
if (IsPointerDevice(device))
|
gdev = GetMaster(device, KEYBOARD_OR_FLOAT);
|
||||||
gdev = GetPairedDevice(device);
|
|
||||||
else
|
|
||||||
gdev = device;
|
|
||||||
} else if (grab->grabtype == GRABTYPE_XI2)
|
} else if (grab->grabtype == GRABTYPE_XI2)
|
||||||
{
|
{
|
||||||
/* if the device is an attached slave device, gdev must be the
|
/* if the device is an attached slave device, gdev must be the
|
||||||
|
@ -4000,8 +3997,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* just deliver it to the focus window */
|
/* just deliver it to the focus window */
|
||||||
ptr = GetPairedDevice(keybd);
|
ptr = GetMaster(keybd, POINTER_OR_FLOAT);
|
||||||
|
|
||||||
|
|
||||||
rc = EventToXI2(event, &xi2);
|
rc = EventToXI2(event, &xi2);
|
||||||
if (rc == Success)
|
if (rc == Success)
|
||||||
|
@ -4501,7 +4497,7 @@ CoreEnterLeaveEvent(
|
||||||
GrabPtr grab = mouse->deviceGrab.grab;
|
GrabPtr grab = mouse->deviceGrab.grab;
|
||||||
Mask mask;
|
Mask mask;
|
||||||
|
|
||||||
keybd = GetPairedDevice(mouse);
|
keybd = GetMaster(mouse, KEYBOARD_OR_FLOAT);
|
||||||
|
|
||||||
if ((pWin == mouse->valuator->motionHintWindow) &&
|
if ((pWin == mouse->valuator->motionHintWindow) &&
|
||||||
(detail != NotifyInferior))
|
(detail != NotifyInferior))
|
||||||
|
@ -4719,10 +4715,7 @@ SetInputFocus(
|
||||||
}
|
}
|
||||||
time = ClientTimeToServerTime(ctime);
|
time = ClientTimeToServerTime(ctime);
|
||||||
|
|
||||||
if (IsKeyboardDevice(dev))
|
keybd = GetMaster(dev, KEYBOARD_OR_FLOAT);
|
||||||
keybd = dev;
|
|
||||||
else
|
|
||||||
keybd = GetPairedDevice(dev);
|
|
||||||
|
|
||||||
if ((focusID == None) || (focusID == PointerRoot))
|
if ((focusID == None) || (focusID == PointerRoot))
|
||||||
focusWin = (WindowPtr)(long)focusID;
|
focusWin = (WindowPtr)(long)focusID;
|
||||||
|
@ -5197,7 +5190,7 @@ ProcQueryPointer(ClientPtr client)
|
||||||
if (rc != Success && rc != BadAccess)
|
if (rc != Success && rc != BadAccess)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
keyboard = GetPairedDevice(mouse);
|
keyboard = GetMaster(mouse, MASTER_KEYBOARD);
|
||||||
|
|
||||||
pSprite = mouse->spriteInfo->sprite;
|
pSprite = mouse->spriteInfo->sprite;
|
||||||
if (mouse->valuator->motionHintWindow)
|
if (mouse->valuator->motionHintWindow)
|
||||||
|
@ -5321,7 +5314,7 @@ ProcSendEvent(ClientPtr client)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
|
WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
|
||||||
DeviceIntPtr dev = PickPointer(client);
|
DeviceIntPtr dev = PickPointer(client);
|
||||||
DeviceIntPtr keybd = GetPairedDevice(dev);
|
DeviceIntPtr keybd = GetMaster(dev, MASTER_KEYBOARD);
|
||||||
SpritePtr pSprite = dev->spriteInfo->sprite;
|
SpritePtr pSprite = dev->spriteInfo->sprite;
|
||||||
REQUEST(xSendEventReq);
|
REQUEST(xSendEventReq);
|
||||||
|
|
||||||
|
@ -5594,7 +5587,7 @@ ProcGrabButton(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = PickPointer(client);
|
ptr = PickPointer(client);
|
||||||
modifierDevice = GetPairedDevice(ptr);
|
modifierDevice = GetMaster(ptr, MASTER_KEYBOARD);
|
||||||
if (stuff->pointerMode == GrabModeSync ||
|
if (stuff->pointerMode == GrabModeSync ||
|
||||||
stuff->keyboardMode == GrabModeSync)
|
stuff->keyboardMode == GrabModeSync)
|
||||||
access_mode |= DixFreezeAccess;
|
access_mode |= DixFreezeAccess;
|
||||||
|
@ -5651,7 +5644,7 @@ ProcUngrabButton(ClientPtr client)
|
||||||
tempGrab.window = pWin;
|
tempGrab.window = pWin;
|
||||||
tempGrab.modifiersDetail.exact = stuff->modifiers;
|
tempGrab.modifiersDetail.exact = stuff->modifiers;
|
||||||
tempGrab.modifiersDetail.pMask = NULL;
|
tempGrab.modifiersDetail.pMask = NULL;
|
||||||
tempGrab.modifierDevice = GetPairedDevice(ptr);
|
tempGrab.modifierDevice = GetMaster(ptr, MASTER_KEYBOARD);
|
||||||
tempGrab.type = ButtonPress;
|
tempGrab.type = ButtonPress;
|
||||||
tempGrab.detail.exact = stuff->button;
|
tempGrab.detail.exact = stuff->button;
|
||||||
tempGrab.grabtype = GRABTYPE_CORE;
|
tempGrab.grabtype = GRABTYPE_CORE;
|
||||||
|
|
|
@ -1546,7 +1546,7 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, const Val
|
||||||
/* Sanity checks. */
|
/* Sanity checks. */
|
||||||
if ((type != ProximityIn && type != ProximityOut) || !mask_in)
|
if ((type != ProximityIn && type != ProximityOut) || !mask_in)
|
||||||
return 0;
|
return 0;
|
||||||
if (!pDev->valuator)
|
if (!pDev->valuator || !pDev->proximity)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
valuator_mask_copy(&mask, mask_in);
|
valuator_mask_copy(&mask, mask_in);
|
||||||
|
|
|
@ -1016,7 +1016,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr keybd)
|
||||||
{
|
{
|
||||||
KeyClassPtr keyc = keybd->key;
|
KeyClassPtr keyc = keybd->key;
|
||||||
DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
|
DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
|
||||||
DeviceIntPtr pointer = GetPairedDevice(keybd);
|
DeviceIntPtr pointer = GetMaster(keybd, POINTER_OR_FLOAT);
|
||||||
DeviceEvent ev;
|
DeviceEvent ev;
|
||||||
|
|
||||||
memset(&ev, 0, sizeof(ev));
|
memset(&ev, 0, sizeof(ev));
|
||||||
|
|
|
@ -827,6 +827,8 @@ InitInput(int argc, char **argv)
|
||||||
|
|
||||||
/* Initialize all configured input devices */
|
/* Initialize all configured input devices */
|
||||||
for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
|
for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
|
||||||
|
(*pInfo)->options = xf86AddNewOption((*pInfo)->options, "driver", (*pInfo)->driver);
|
||||||
|
(*pInfo)->options = xf86AddNewOption((*pInfo)->options, "identifier", (*pInfo)->name);
|
||||||
/* If one fails, the others will too */
|
/* If one fails, the others will too */
|
||||||
if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
|
if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1275,7 +1275,7 @@ xf86PostKeyEventM(DeviceIntPtr device,
|
||||||
DeviceIntPtr pointer;
|
DeviceIntPtr pointer;
|
||||||
|
|
||||||
/* Some pointers send key events, paired device is wrong then. */
|
/* Some pointers send key events, paired device is wrong then. */
|
||||||
pointer = IsPointerDevice(device) ? device : GetPairedDevice(device);
|
pointer = GetMaster(device, POINTER_OR_FLOAT);
|
||||||
if (miPointerGetScreen(pointer)) {
|
if (miPointerGetScreen(pointer)) {
|
||||||
int index = miPointerGetScreen(pointer)->myNum;
|
int index = miPointerGetScreen(pointer)->myNum;
|
||||||
|
|
||||||
|
|
|
@ -463,13 +463,13 @@ extern _X_EXPORT void QueueKeyboardEvents(
|
||||||
int key_code,
|
int key_code,
|
||||||
const ValuatorMask *mask);
|
const ValuatorMask *mask);
|
||||||
|
|
||||||
extern int GetProximityEvents(
|
extern _X_EXPORT int GetProximityEvents(
|
||||||
InternalEvent *events,
|
InternalEvent *events,
|
||||||
DeviceIntPtr pDev,
|
DeviceIntPtr pDev,
|
||||||
int type,
|
int type,
|
||||||
const ValuatorMask *mask);
|
const ValuatorMask *mask);
|
||||||
|
|
||||||
extern void QueueProximityEvents(
|
extern _X_EXPORT void QueueProximityEvents(
|
||||||
DeviceIntPtr pDev,
|
DeviceIntPtr pDev,
|
||||||
int type,
|
int type,
|
||||||
const ValuatorMask *mask);
|
const ValuatorMask *mask);
|
||||||
|
|
|
@ -1203,7 +1203,7 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
|
||||||
if (keyEvent)
|
if (keyEvent)
|
||||||
tmpdev = dev;
|
tmpdev = dev;
|
||||||
else
|
else
|
||||||
tmpdev = GetPairedDevice(dev);
|
tmpdev = GetMaster(dev, POINTER_OR_FLOAT);
|
||||||
|
|
||||||
UNWRAP_PROCESS_INPUT_PROC(tmpdev,xkbPrivPtr, backupproc);
|
UNWRAP_PROCESS_INPUT_PROC(tmpdev,xkbPrivPtr, backupproc);
|
||||||
dev->public.processInputProc((InternalEvent*)event, tmpdev);
|
dev->public.processInputProc((InternalEvent*)event, tmpdev);
|
||||||
|
|
Loading…
Reference in New Issue