diff options
author | marha <marha@users.sourceforge.net> | 2011-03-04 13:54:03 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-04 13:54:03 +0000 |
commit | 0a5888393c68f6f7db86206d1f277232db18240b (patch) | |
tree | 9afe740e7b124ea8d2125ef7be0d42760d3b8e6a /xorg-server/Xi/exevents.c | |
parent | 56950d7bed70ee82186f44f9333537cdbb33c448 (diff) | |
download | vcxsrv-0a5888393c68f6f7db86206d1f277232db18240b.tar.gz vcxsrv-0a5888393c68f6f7db86206d1f277232db18240b.tar.bz2 vcxsrv-0a5888393c68f6f7db86206d1f277232db18240b.zip |
xserver xkeyboard-config mesa git update 4 Marc 2011
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r-- | xorg-server/Xi/exevents.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 327873e29..c7089bb69 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -710,10 +710,13 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce) if (rc != Success) return; /* Device has disappeared */ - if (!slave->u.master) + if (IsMaster(slave)) + return; + + if (IsFloating(slave)) return; /* set floating since the event */ - if (slave->u.master->id != dce->masterid) + if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid) return; /* not our slave anymore, don't care */ /* FIXME: we probably need to send a DCE for the new slave now */ @@ -866,7 +869,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) * event being delivered through the slave first */ for (sd = inputInfo.devices; sd; sd = sd->next) { - if (IsMaster(sd) || sd->u.master != device) + if (IsMaster(sd) || GetMaster(sd, MASTER_POINTER) != device) continue; if (!sd->button) continue; @@ -1006,7 +1009,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) b = device->button; k = device->key; - if (IsMaster(device) || !device->u.master) + if (IsMaster(device) || IsFloating(device)) CheckMotion(event, device); switch (event->type) @@ -1047,10 +1050,8 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) switch(event->type) { case ET_KeyPress: - if (!grab && CheckDeviceGrabs(device, event, 0)) { - device->deviceGrab.activatingKey = key; + if (!grab && CheckDeviceGrabs(device, event, 0)) return; - } break; case ET_KeyRelease: if (grab && device->deviceGrab.fromPassiveGrab && @@ -1223,7 +1224,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, DeviceIntPtr mouse; int btlen, len, i; - mouse = (IsMaster(dev) || dev->u.master) ? GetMaster(dev, MASTER_POINTER) : dev; + mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER); /* XI 2 event */ btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0; @@ -1280,7 +1281,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1, DeviceFocusChangeMask, NullGrab); - if ((type == DeviceFocusIn) && + if ((event.type == DeviceFocusIn) && (wOtherInputMasks(pWin)) && (wOtherInputMasks(pWin)->inputEvents[dev->id] & DeviceStateNotifyMask)) { |