aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
committermarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
commitd6d3999ccb2cb72d55820770260172eccbbb68d7 (patch)
tree568ce82dd1a8e2edbbe8cd4cb5ab5b14157f34f6 /xorg-server/Xi
parentfffd436e9c2ec6f5aa501ee57d0e4ade7293ee60 (diff)
downloadvcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.gz
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.bz2
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.zip
libX11 xserver pixman mesa git update 16 Apr 2012
Diffstat (limited to 'xorg-server/Xi')
-rw-r--r--xorg-server/Xi/allowev.c32
-rw-r--r--xorg-server/Xi/allowev.h6
-rw-r--r--xorg-server/Xi/chgdctl.h10
-rw-r--r--xorg-server/Xi/chgfctl.h6
-rw-r--r--xorg-server/Xi/chgkbd.c2
-rw-r--r--xorg-server/Xi/chgkbd.h6
-rw-r--r--xorg-server/Xi/chgkmap.c8
-rw-r--r--xorg-server/Xi/chgkmap.h6
-rw-r--r--xorg-server/Xi/chgprop.h6
-rw-r--r--xorg-server/Xi/chgptr.c6
-rw-r--r--xorg-server/Xi/chgptr.h14
-rw-r--r--xorg-server/Xi/closedev.c40
-rw-r--r--xorg-server/Xi/closedev.h6
-rw-r--r--xorg-server/Xi/devbell.h6
-rw-r--r--xorg-server/Xi/exevents.c86
-rw-r--r--xorg-server/Xi/exglobals.h3
-rw-r--r--xorg-server/Xi/getbmap.c12
-rw-r--r--xorg-server/Xi/getbmap.h10
-rw-r--r--xorg-server/Xi/getdctl.h10
-rw-r--r--xorg-server/Xi/getfctl.c110
-rw-r--r--xorg-server/Xi/getfctl.h10
-rw-r--r--xorg-server/Xi/getfocus.c18
-rw-r--r--xorg-server/Xi/getfocus.h10
-rw-r--r--xorg-server/Xi/getkmap.c22
-rw-r--r--xorg-server/Xi/getkmap.h10
-rw-r--r--xorg-server/Xi/getmmap.c10
-rw-r--r--xorg-server/Xi/getmmap.h10
-rw-r--r--xorg-server/Xi/getprop.h18
-rw-r--r--xorg-server/Xi/getselev.c72
-rw-r--r--xorg-server/Xi/getselev.h10
-rw-r--r--xorg-server/Xi/getvers.c10
-rw-r--r--xorg-server/Xi/getvers.h10
-rw-r--r--xorg-server/Xi/grabdev.h20
-rw-r--r--xorg-server/Xi/grabdevb.h6
-rw-r--r--xorg-server/Xi/grabdevk.h6
-rw-r--r--xorg-server/Xi/gtmotion.c48
-rw-r--r--xorg-server/Xi/gtmotion.h10
-rw-r--r--xorg-server/Xi/listdev.h12
-rw-r--r--xorg-server/Xi/opendev.h10
-rw-r--r--xorg-server/Xi/queryst.h10
-rw-r--r--xorg-server/Xi/selectev.h6
-rw-r--r--xorg-server/Xi/sendexev.h6
-rw-r--r--xorg-server/Xi/setbmap.h10
-rw-r--r--xorg-server/Xi/setdval.c26
-rw-r--r--xorg-server/Xi/setdval.h10
-rw-r--r--xorg-server/Xi/setfocus.c10
-rw-r--r--xorg-server/Xi/setfocus.h6
-rw-r--r--xorg-server/Xi/setmmap.c14
-rw-r--r--xorg-server/Xi/setmmap.h10
-rw-r--r--xorg-server/Xi/setmode.h10
-rw-r--r--xorg-server/Xi/ungrdev.c12
-rw-r--r--xorg-server/Xi/ungrdev.h6
-rw-r--r--xorg-server/Xi/ungrdevb.h6
-rw-r--r--xorg-server/Xi/ungrdevk.h6
-rw-r--r--xorg-server/Xi/xiallowev.h2
-rw-r--r--xorg-server/Xi/xichangecursor.h6
-rw-r--r--xorg-server/Xi/xichangehierarchy.h6
-rw-r--r--xorg-server/Xi/xigetclientpointer.h12
-rw-r--r--xorg-server/Xi/xigrabdev.h2
-rw-r--r--xorg-server/Xi/xiquerydevice.c2
-rw-r--r--xorg-server/Xi/xiquerydevice.h20
-rw-r--r--xorg-server/Xi/xiquerypointer.h10
-rw-r--r--xorg-server/Xi/xiqueryversion.h4
-rw-r--r--xorg-server/Xi/xiselectev.h4
-rw-r--r--xorg-server/Xi/xisetclientpointer.h6
-rw-r--r--xorg-server/Xi/xisetdevfocus.c28
-rw-r--r--xorg-server/Xi/xisetdevfocus.h4
-rw-r--r--xorg-server/Xi/xiwarppointer.h6
68 files changed, 525 insertions, 442 deletions
diff --git a/xorg-server/Xi/allowev.c b/xorg-server/Xi/allowev.c
index ff9e667b0..770fe9fd8 100644
--- a/xorg-server/Xi/allowev.c
+++ b/xorg-server/Xi/allowev.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
@@ -97,31 +97,31 @@ ProcXAllowDeviceEvents(ClientPtr client)
rc = dixLookupDevice(&thisdev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
time = ClientTimeToServerTime(stuff->time);
switch (stuff->mode) {
case ReplayThisDevice:
- AllowSome(client, time, thisdev, NOT_GRABBED);
- break;
+ AllowSome(client, time, thisdev, NOT_GRABBED);
+ break;
case SyncThisDevice:
- AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
- break;
+ AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
+ break;
case AsyncThisDevice:
- AllowSome(client, time, thisdev, THAWED);
- break;
+ AllowSome(client, time, thisdev, THAWED);
+ break;
case AsyncOtherDevices:
- AllowSome(client, time, thisdev, THAW_OTHERS);
- break;
+ AllowSome(client, time, thisdev, THAW_OTHERS);
+ break;
case SyncAll:
- AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
- break;
+ AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
+ break;
case AsyncAll:
- AllowSome(client, time, thisdev, THAWED_BOTH);
- break;
+ AllowSome(client, time, thisdev, THAWED_BOTH);
+ break;
default:
- client->errorValue = stuff->mode;
- return BadValue;
+ client->errorValue = stuff->mode;
+ return BadValue;
}
return Success;
}
diff --git a/xorg-server/Xi/allowev.h b/xorg-server/Xi/allowev.h
index 199744fea..f081ab52e 100644
--- a/xorg-server/Xi/allowev.h
+++ b/xorg-server/Xi/allowev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef ALLOWEV_H
#define ALLOWEV_H 1
-int SProcXAllowDeviceEvents(ClientPtr /* client */
+int SProcXAllowDeviceEvents(ClientPtr /* client */
);
-int ProcXAllowDeviceEvents(ClientPtr /* client */
+int ProcXAllowDeviceEvents(ClientPtr /* client */
);
-#endif /* ALLOWEV_H */
+#endif /* ALLOWEV_H */
diff --git a/xorg-server/Xi/chgdctl.h b/xorg-server/Xi/chgdctl.h
index 9cda225cb..f5ca5e766 100644
--- a/xorg-server/Xi/chgdctl.h
+++ b/xorg-server/Xi/chgdctl.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGDCTL_H
#define CHGDCTL_H 1
-int SProcXChangeDeviceControl(ClientPtr /* client */
+int SProcXChangeDeviceControl(ClientPtr /* client */
);
-int ProcXChangeDeviceControl(ClientPtr /* client */
+int ProcXChangeDeviceControl(ClientPtr /* client */
);
void SRepXChangeDeviceControl(ClientPtr /* client */ ,
- int /* size */ ,
- xChangeDeviceControlReply * /* rep */
+ int /* size */ ,
+ xChangeDeviceControlReply * /* rep */
);
-#endif /* CHGDCTL_H */
+#endif /* CHGDCTL_H */
diff --git a/xorg-server/Xi/chgfctl.h b/xorg-server/Xi/chgfctl.h
index cfa9fc6b0..45a55a5f8 100644
--- a/xorg-server/Xi/chgfctl.h
+++ b/xorg-server/Xi/chgfctl.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGFCTL_H
#define CHGFCTL_H 1
-int SProcXChangeFeedbackControl(ClientPtr /* client */
+int SProcXChangeFeedbackControl(ClientPtr /* client */
);
-int ProcXChangeFeedbackControl(ClientPtr /* client */
+int ProcXChangeFeedbackControl(ClientPtr /* client */
);
-#endif /* CHGFCTL_H */
+#endif /* CHGFCTL_H */
diff --git a/xorg-server/Xi/chgkbd.c b/xorg-server/Xi/chgkbd.c
index d8139193f..ea91eb371 100644
--- a/xorg-server/Xi/chgkbd.c
+++ b/xorg-server/Xi/chgkbd.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
diff --git a/xorg-server/Xi/chgkbd.h b/xorg-server/Xi/chgkbd.h
index 5f9922336..ec567fe42 100644
--- a/xorg-server/Xi/chgkbd.h
+++ b/xorg-server/Xi/chgkbd.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGKBD_H
#define CHGKBD_H 1
-int SProcXChangeKeyboardDevice(ClientPtr /* client */
+int SProcXChangeKeyboardDevice(ClientPtr /* client */
);
-int ProcXChangeKeyboardDevice(ClientPtr /* client */
+int ProcXChangeKeyboardDevice(ClientPtr /* client */
);
-#endif /* CHGKBD_H */
+#endif /* CHGKBD_H */
diff --git a/xorg-server/Xi/chgkmap.c b/xorg-server/Xi/chgkmap.c
index 32caa2d02..49660f944 100644
--- a/xorg-server/Xi/chgkmap.c
+++ b/xorg-server/Xi/chgkmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
@@ -105,12 +105,12 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
if (ret != Success)
- return ret;
+ return ret;
len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq));
ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
- stuff->firstKeyCode, stuff->keyCodes,
- stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]);
+ stuff->firstKeyCode, stuff->keyCodes,
+ stuff->keySymsPerKeyCode, (KeySym *) &stuff[1]);
return ret;
}
diff --git a/xorg-server/Xi/chgkmap.h b/xorg-server/Xi/chgkmap.h
index 6ed6420fb..633af7ca4 100644
--- a/xorg-server/Xi/chgkmap.h
+++ b/xorg-server/Xi/chgkmap.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGKMAP_H
#define CHGKMAP_H 1
-int SProcXChangeDeviceKeyMapping(ClientPtr /* client */
+int SProcXChangeDeviceKeyMapping(ClientPtr /* client */
);
-int ProcXChangeDeviceKeyMapping(ClientPtr /* client */
+int ProcXChangeDeviceKeyMapping(ClientPtr /* client */
);
-#endif /* CHGKMAP_H */
+#endif /* CHGKMAP_H */
diff --git a/xorg-server/Xi/chgprop.h b/xorg-server/Xi/chgprop.h
index 36716180a..89d6b5695 100644
--- a/xorg-server/Xi/chgprop.h
+++ b/xorg-server/Xi/chgprop.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGPROP_H
#define CHGPROP_H 1
-int SProcXChangeDeviceDontPropagateList(ClientPtr /* client */
+int SProcXChangeDeviceDontPropagateList(ClientPtr /* client */
);
-int ProcXChangeDeviceDontPropagateList(ClientPtr /* client */
+int ProcXChangeDeviceDontPropagateList(ClientPtr /* client */
);
-#endif /* CHGPROP_H */
+#endif /* CHGPROP_H */
diff --git a/xorg-server/Xi/chgptr.c b/xorg-server/Xi/chgptr.c
index ee04ab662..f99d1aaea 100644
--- a/xorg-server/Xi/chgptr.c
+++ b/xorg-server/Xi/chgptr.c
@@ -54,12 +54,12 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
-#include "windowstr.h" /* window structure */
-#include "scrnintstr.h" /* screen structure */
+#include "windowstr.h" /* window structure */
+#include "scrnintstr.h" /* screen structure */
#include "dixevents.h"
#include "exevents.h"
diff --git a/xorg-server/Xi/chgptr.h b/xorg-server/Xi/chgptr.h
index 2d8ab66e5..47265b3bc 100644
--- a/xorg-server/Xi/chgptr.h
+++ b/xorg-server/Xi/chgptr.h
@@ -30,19 +30,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGPTR_H
#define CHGPTR_H 1
-int SProcXChangePointerDevice(ClientPtr /* client */
+int SProcXChangePointerDevice(ClientPtr /* client */
);
-int ProcXChangePointerDevice(ClientPtr /* client */
+int ProcXChangePointerDevice(ClientPtr /* client */
);
-void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */
+void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */
);
void SendEventToAllWindows(DeviceIntPtr /* dev */ ,
- Mask /* mask */ ,
- xEvent * /* ev */ ,
- int /* count */
+ Mask /* mask */ ,
+ xEvent * /* ev */ ,
+ int /* count */
);
-#endif /* CHGPTR_H */
+#endif /* CHGPTR_H */
diff --git a/xorg-server/Xi/closedev.c b/xorg-server/Xi/closedev.c
index 54ada55f5..154e6ce08 100644
--- a/xorg-server/Xi/closedev.c
+++ b/xorg-server/Xi/closedev.c
@@ -54,9 +54,9 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
-#include "scrnintstr.h" /* screen structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
+#include "scrnintstr.h" /* screen structure */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
@@ -94,15 +94,15 @@ DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
GrabPtr grab, next;
if ((pOthers = wOtherInputMasks(pWin)) != 0)
- for (others = pOthers->inputClients; others; others = others->next)
- if (SameClient(others, client))
- others->mask[dev->id] = NoEventMask;
+ for (others = pOthers->inputClients; others; others = others->next)
+ if (SameClient(others, client))
+ others->mask[dev->id] = NoEventMask;
for (grab = wPassiveGrabs(pWin); grab; grab = next) {
- next = grab->next;
- if ((grab->device == dev) &&
- (client->clientAsMask == CLIENT_BITS(grab->resource)))
- FreeResource(grab->resource, RT_NONE);
+ next = grab->next;
+ if ((grab->device == dev) &&
+ (client->clientAsMask == CLIENT_BITS(grab->resource)))
+ FreeResource(grab->resource, RT_NONE);
}
}
@@ -119,10 +119,10 @@ DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client)
WindowPtr p2;
while (p1) {
- p2 = p1->firstChild;
- DeleteDeviceEvents(dev, p1, client);
- DeleteEventsFromChildren(dev, p2, client);
- p1 = p1->nextSib;
+ p2 = p1->firstChild;
+ DeleteDeviceEvents(dev, p1, client);
+ DeleteEventsFromChildren(dev, p2, client);
+ p1 = p1->nextSib;
}
}
@@ -144,20 +144,20 @@ ProcXCloseDevice(ClientPtr client)
rc = dixLookupDevice(&d, stuff->deviceid, client, DixUseAccess);
if (rc != Success)
- return rc;
+ return rc;
if (d->deviceGrab.grab && SameClient(d->deviceGrab.grab, client))
- (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */
+ (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */
/* Remove event selections from all windows for events from this device
* and selected by this client.
* Delete passive grabs from all windows for this device. */
for (i = 0; i < screenInfo.numScreens; i++) {
- pWin = screenInfo.screens[i]->root;
- DeleteDeviceEvents(d, pWin, client);
- p1 = pWin->firstChild;
- DeleteEventsFromChildren(d, p1, client);
+ pWin = screenInfo.screens[i]->root;
+ DeleteDeviceEvents(d, pWin, client);
+ p1 = pWin->firstChild;
+ DeleteEventsFromChildren(d, p1, client);
}
return Success;
diff --git a/xorg-server/Xi/closedev.h b/xorg-server/Xi/closedev.h
index 400aaa60b..798c02379 100644
--- a/xorg-server/Xi/closedev.h
+++ b/xorg-server/Xi/closedev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CLOSEDEV_H
#define CLOSEDEV_H 1
-int SProcXCloseDevice(ClientPtr /* client */
+int SProcXCloseDevice(ClientPtr /* client */
);
-int ProcXCloseDevice(ClientPtr /* client */
+int ProcXCloseDevice(ClientPtr /* client */
);
-#endif /* CLOSEDEV_H */
+#endif /* CLOSEDEV_H */
diff --git a/xorg-server/Xi/devbell.h b/xorg-server/Xi/devbell.h
index 02a77a6b9..2d0b05aa3 100644
--- a/xorg-server/Xi/devbell.h
+++ b/xorg-server/Xi/devbell.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DEVBELL_H
#define DEVBELL_H 1
-int SProcXDeviceBell(ClientPtr /* client */
+int SProcXDeviceBell(ClientPtr /* client */
);
-int ProcXDeviceBell(ClientPtr /* client */
+int ProcXDeviceBell(ClientPtr /* client */
);
-#endif /* DEVBELL_H */
+#endif /* DEVBELL_H */
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index ff2224094..c05c22604 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1111,6 +1111,48 @@ EmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource)
}
/**
+ * Find the oldest touch that still has a pointer emulation client.
+ *
+ * Pointer emulation can only be performed for the oldest touch. Otherwise, the
+ * order of events seen by the client will be wrong. This function helps us find
+ * the next touch to be emulated.
+ *
+ * @param dev The device to find touches for.
+ */
+static TouchPointInfoPtr
+FindOldestPointerEmulatedTouch(DeviceIntPtr dev)
+{
+ TouchPointInfoPtr oldest = NULL;
+ int i;
+
+ for (i = 0; i < dev->touch->num_touches; i++) {
+ TouchPointInfoPtr ti = dev->touch->touches + i;
+ int j;
+
+ if (!ti->active || !ti->emulate_pointer)
+ continue;
+
+ for (j = 0; j < ti->num_listeners; j++) {
+ if (ti->listeners[j].type == LISTENER_POINTER_GRAB ||
+ ti->listeners[j].type == LISTENER_POINTER_REGULAR)
+ break;
+ }
+ if (j == ti->num_listeners)
+ continue;
+
+ if (!oldest) {
+ oldest = ti;
+ continue;
+ }
+
+ if (oldest->client_id - ti->client_id < UINT_MAX / 2)
+ oldest = ti;
+ }
+
+ return oldest;
+}
+
+/**
* If the current owner has rejected the event, deliver the
* TouchOwnership/TouchBegin to the next item in the sprite stack.
*/
@@ -1123,8 +1165,16 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
ti->listeners[0].state == LISTENER_EARLY_ACCEPT)
DeliverTouchEvents(dev, ti, (InternalEvent *) ev,
ti->listeners[0].listener);
- else if (ti->listeners[0].state == LISTENER_AWAITING_BEGIN)
+ else if (ti->listeners[0].state == LISTENER_AWAITING_BEGIN) {
+ /* We can't punt to a pointer listener unless all older pointer
+ * emulated touches have been seen already. */
+ if ((ti->listeners[0].type == LISTENER_POINTER_GRAB ||
+ ti->listeners[0].type == LISTENER_POINTER_REGULAR) &&
+ ti != FindOldestPointerEmulatedTouch(dev))
+ return;
+
TouchEventHistoryReplay(ti, dev, ti->listeners[0].listener);
+ }
/* If we've just removed the last grab and the touch has physically
* ended, send a TouchEnd event too and finalise the touch. */
@@ -1139,6 +1189,25 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
}
/**
+ * Check the oldest touch to see if it needs to be replayed to its pointer
+ * owner.
+ *
+ * Touch event propagation is paused if it hits a pointer listener while an
+ * older touch with a pointer listener is waiting on accept or reject. This
+ * function will restart propagation of a paused touch if needed.
+ *
+ * @param dev The device to check touches for.
+ */
+static void
+CheckOldestTouch(DeviceIntPtr dev)
+{
+ TouchPointInfoPtr oldest = FindOldestPointerEmulatedTouch(dev);
+
+ if (oldest && oldest->listeners[0].state == LISTENER_AWAITING_BEGIN)
+ TouchPuntToNextOwner(dev, oldest, NULL);
+}
+
+/**
* Process a touch rejection.
*
* @param sourcedev The source device of the touch sequence.
@@ -1169,6 +1238,7 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
* finish, then we can just kill it now. */
if (ti->num_listeners == 1 && ti->pending_finish) {
TouchEndTouch(sourcedev, ti);
+ CheckOldestTouch(sourcedev);
return;
}
@@ -1184,6 +1254,8 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
* the TouchOwnership or TouchBegin event to the new owner. */
if (ev && ti->num_listeners > 0 && was_owner)
TouchPuntToNextOwner(sourcedev, ti, ev);
+
+ CheckOldestTouch(sourcedev);
}
/**
@@ -1389,8 +1461,11 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (ev->any.type == ET_TouchEnd &&
!dev->button->buttonsDown &&
- dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab))
+ dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
(*dev->deviceGrab.DeactivateGrab) (dev);
+ CheckOldestTouch(dev);
+ return Success;
+ }
}
}
else {
@@ -1755,6 +1830,13 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
listener->type == LISTENER_POINTER_GRAB) {
rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win,
grab, xi2mask);
+
+ if (ti->num_listeners > 1) {
+ ev->any.type = ET_TouchUpdate;
+ ev->device_event.flags |= TOUCH_PENDING_END;
+ ti->pending_finish = TRUE;
+ }
+
goto out;
}
diff --git a/xorg-server/Xi/exglobals.h b/xorg-server/Xi/exglobals.h
index 8c5a42e6e..9f235e034 100644
--- a/xorg-server/Xi/exglobals.h
+++ b/xorg-server/Xi/exglobals.h
@@ -79,6 +79,7 @@ extern int DevicePropertyNotify;
extern RESTYPE RT_INPUTCLIENT;
extern DevPrivateKeyRec XIClientPrivateKeyRec;
+
#define XIClientPrivateKey (&XIClientPrivateKeyRec)
-#endif /* EXGLOBALS_H */
+#endif /* EXGLOBALS_H */
diff --git a/xorg-server/Xi/getbmap.c b/xorg-server/Xi/getbmap.c
index b7054f7d2..a0ec1a61b 100644
--- a/xorg-server/Xi/getbmap.c
+++ b/xorg-server/Xi/getbmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -100,16 +100,16 @@ ProcXGetDeviceButtonMapping(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
b = dev->button;
if (b == NULL)
- return BadMatch;
+ return BadMatch;
rep.nElts = b->numButtons;
rep.length = bytes_to_int32(rep.nElts);
WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep);
- (void)WriteToClient(client, rep.nElts, (char *)&b->map[1]);
+ (void) WriteToClient(client, rep.nElts, (char *) &b->map[1]);
return Success;
}
@@ -122,9 +122,9 @@ ProcXGetDeviceButtonMapping(ClientPtr client)
void
SRepXGetDeviceButtonMapping(ClientPtr client, int size,
- xGetDeviceButtonMappingReply * rep)
+ xGetDeviceButtonMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getbmap.h b/xorg-server/Xi/getbmap.h
index d95b3c67c..8b107d026 100644
--- a/xorg-server/Xi/getbmap.h
+++ b/xorg-server/Xi/getbmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETBMAP_H
#define GETBMAP_H 1
-int SProcXGetDeviceButtonMapping(ClientPtr /* client */
+int SProcXGetDeviceButtonMapping(ClientPtr /* client */
);
-int ProcXGetDeviceButtonMapping(ClientPtr /* client */
+int ProcXGetDeviceButtonMapping(ClientPtr /* client */
);
void SRepXGetDeviceButtonMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceButtonMappingReply * /* rep */
+ int /* size */ ,
+ xGetDeviceButtonMappingReply * /* rep */
);
-#endif /* GETBMAP_H */
+#endif /* GETBMAP_H */
diff --git a/xorg-server/Xi/getdctl.h b/xorg-server/Xi/getdctl.h
index 19c189f36..7ca739264 100644
--- a/xorg-server/Xi/getdctl.h
+++ b/xorg-server/Xi/getdctl.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETDCTL_H
#define GETDCTL_H 1
-int SProcXGetDeviceControl(ClientPtr /* client */
+int SProcXGetDeviceControl(ClientPtr /* client */
);
-int ProcXGetDeviceControl(ClientPtr /* client */
+int ProcXGetDeviceControl(ClientPtr /* client */
);
void SRepXGetDeviceControl(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceControlReply * /* rep */
+ int /* size */ ,
+ xGetDeviceControlReply * /* rep */
);
-#endif /* GETDCTL_H */
+#endif /* GETDCTL_H */
diff --git a/xorg-server/Xi/getfctl.c b/xorg-server/Xi/getfctl.c
index ea80a879d..2772c0c26 100644
--- a/xorg-server/Xi/getfctl.c
+++ b/xorg-server/Xi/getfctl.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -99,13 +99,13 @@ CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
k2->led_mask = k->ctrl.leds;
k2->global_auto_repeat = k->ctrl.autoRepeat;
for (i = 0; i < 32; i++)
- k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
+ k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
if (client->swapped) {
- swaps(&k2->length);
- swaps(&k2->pitch);
- swaps(&k2->duration);
- swapl(&k2->led_mask);
- swapl(&k2->led_values);
+ swaps(&k2->length);
+ swaps(&k2->pitch);
+ swaps(&k2->duration);
+ swapl(&k2->led_mask);
+ swapl(&k2->led_values);
}
*buf += sizeof(xKbdFeedbackState);
}
@@ -129,10 +129,10 @@ CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
p2->accelDenom = p->ctrl.den;
p2->threshold = p->ctrl.threshold;
if (client->swapped) {
- swaps(&p2->length);
- swaps(&p2->accelNum);
- swaps(&p2->accelDenom);
- swaps(&p2->threshold);
+ swaps(&p2->length);
+ swaps(&p2->accelNum);
+ swaps(&p2->accelDenom);
+ swaps(&p2->threshold);
}
*buf += sizeof(xPtrFeedbackState);
}
@@ -156,10 +156,10 @@ CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf)
i2->min_value = i->ctrl.min_value;
i2->max_value = i->ctrl.max_value;
if (client->swapped) {
- swaps(&i2->length);
- swapl(&i2->resolution);
- swapl(&i2->min_value);
- swapl(&i2->max_value);
+ swaps(&i2->length);
+ swapl(&i2->resolution);
+ swapl(&i2->min_value);
+ swapl(&i2->max_value);
}
*buf += sizeof(xIntegerFeedbackState);
}
@@ -180,22 +180,22 @@ CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
s2 = (xStringFeedbackState *) * buf;
s2->class = StringFeedbackClass;
s2->length = sizeof(xStringFeedbackState) +
- s->ctrl.num_symbols_supported * sizeof(KeySym);
+ s->ctrl.num_symbols_supported * sizeof(KeySym);
s2->id = s->ctrl.id;
s2->max_symbols = s->ctrl.max_symbols;
s2->num_syms_supported = s->ctrl.num_symbols_supported;
*buf += sizeof(xStringFeedbackState);
kptr = (KeySym *) (*buf);
for (i = 0; i < s->ctrl.num_symbols_supported; i++)
- *kptr++ = *(s->ctrl.symbols_supported + i);
+ *kptr++ = *(s->ctrl.symbols_supported + i);
if (client->swapped) {
- swaps(&s2->length);
- swaps(&s2->max_symbols);
- swaps(&s2->num_syms_supported);
- kptr = (KeySym *) (*buf);
- for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
- swapl(kptr);
- }
+ swaps(&s2->length);
+ swaps(&s2->max_symbols);
+ swaps(&s2->num_syms_supported);
+ kptr = (KeySym *) (*buf);
+ for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
+ swapl(kptr);
+ }
}
*buf += (s->ctrl.num_symbols_supported * sizeof(KeySym));
}
@@ -218,9 +218,9 @@ CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
l2->led_values = l->ctrl.led_values;
l2->led_mask = l->ctrl.led_mask;
if (client->swapped) {
- swaps(&l2->length);
- swapl(&l2->led_values);
- swapl(&l2->led_mask);
+ swaps(&l2->length);
+ swapl(&l2->led_values);
+ swapl(&l2->led_mask);
}
*buf += sizeof(xLedFeedbackState);
}
@@ -244,9 +244,9 @@ CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
b2->pitch = b->ctrl.pitch;
b2->duration = b->ctrl.duration;
if (client->swapped) {
- swaps(&b2->length);
- swaps(&b2->pitch);
- swaps(&b2->duration);
+ swaps(&b2->length);
+ swaps(&b2->pitch);
+ swaps(&b2->duration);
}
*buf += sizeof(xBellFeedbackState);
}
@@ -260,12 +260,12 @@ CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
void
SRepXGetFeedbackControl(ClientPtr client, int size,
- xGetFeedbackControlReply * rep)
+ xGetFeedbackControlReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swaps(&rep->num_feedbacks);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
/***********************************************************************
@@ -293,7 +293,7 @@ ProcXGetFeedbackControl(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
rep.repType = X_Reply;
rep.RepType = X_GetFeedbackControl;
@@ -302,51 +302,51 @@ ProcXGetFeedbackControl(ClientPtr client)
rep.num_feedbacks = 0;
for (k = dev->kbdfeed; k; k = k->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xKbdFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xKbdFeedbackState);
}
for (p = dev->ptrfeed; p; p = p->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xPtrFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xPtrFeedbackState);
}
for (s = dev->stringfeed; s; s = s->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xStringFeedbackState) +
- (s->ctrl.num_symbols_supported * sizeof(KeySym));
+ rep.num_feedbacks++;
+ total_length += sizeof(xStringFeedbackState) +
+ (s->ctrl.num_symbols_supported * sizeof(KeySym));
}
for (i = dev->intfeed; i; i = i->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xIntegerFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xIntegerFeedbackState);
}
for (l = dev->leds; l; l = l->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xLedFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xLedFeedbackState);
}
for (b = dev->bell; b; b = b->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xBellFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xBellFeedbackState);
}
if (total_length == 0)
- return BadMatch;
+ return BadMatch;
- buf = (char *)malloc(total_length);
+ buf = (char *) malloc(total_length);
if (!buf)
- return BadAlloc;
+ return BadAlloc;
savbuf = buf;
for (k = dev->kbdfeed; k; k = k->next)
- CopySwapKbdFeedback(client, k, &buf);
+ CopySwapKbdFeedback(client, k, &buf);
for (p = dev->ptrfeed; p; p = p->next)
- CopySwapPtrFeedback(client, p, &buf);
+ CopySwapPtrFeedback(client, p, &buf);
for (s = dev->stringfeed; s; s = s->next)
- CopySwapStringFeedback(client, s, &buf);
+ CopySwapStringFeedback(client, s, &buf);
for (i = dev->intfeed; i; i = i->next)
- CopySwapIntegerFeedback(client, i, &buf);
+ CopySwapIntegerFeedback(client, i, &buf);
for (l = dev->leds; l; l = l->next)
- CopySwapLedFeedback(client, l, &buf);
+ CopySwapLedFeedback(client, l, &buf);
for (b = dev->bell; b; b = b->next)
- CopySwapBellFeedback(client, b, &buf);
+ CopySwapBellFeedback(client, b, &buf);
rep.length = bytes_to_int32(total_length);
WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep);
diff --git a/xorg-server/Xi/getfctl.h b/xorg-server/Xi/getfctl.h
index 0ad58aa2b..f0b240d4c 100644
--- a/xorg-server/Xi/getfctl.h
+++ b/xorg-server/Xi/getfctl.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETFCTL_H
#define GETFCTL_H 1
-int SProcXGetFeedbackControl(ClientPtr /* client */
+int SProcXGetFeedbackControl(ClientPtr /* client */
);
-int ProcXGetFeedbackControl(ClientPtr /* client */
+int ProcXGetFeedbackControl(ClientPtr /* client */
);
void SRepXGetFeedbackControl(ClientPtr /* client */ ,
- int /* size */ ,
- xGetFeedbackControlReply * /* rep */
+ int /* size */ ,
+ xGetFeedbackControlReply * /* rep */
);
-#endif /* GETFCTL_H */
+#endif /* GETFCTL_H */
diff --git a/xorg-server/Xi/getfocus.c b/xorg-server/Xi/getfocus.c
index 676850df1..ba36e37e3 100644
--- a/xorg-server/Xi/getfocus.c
+++ b/xorg-server/Xi/getfocus.c
@@ -54,8 +54,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "windowstr.h" /* focus struct */
-#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* focus struct */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -95,9 +95,9 @@ ProcXGetDeviceFocus(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess);
if (rc != Success)
- return rc;
+ return rc;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
rep.repType = X_Reply;
rep.RepType = X_GetDeviceFocus;
@@ -107,13 +107,13 @@ ProcXGetDeviceFocus(ClientPtr client)
focus = dev->focus;
if (focus->win == NoneWin)
- rep.focus = None;
+ rep.focus = None;
else if (focus->win == PointerRootWin)
- rep.focus = PointerRoot;
+ rep.focus = PointerRoot;
else if (focus->win == FollowKeyboardWin)
- rep.focus = FollowKeyboard;
+ rep.focus = FollowKeyboard;
else
- rep.focus = focus->win->drawable.id;
+ rep.focus = focus->win->drawable.id;
rep.time = focus->time.milliseconds;
rep.revertTo = focus->revert;
@@ -135,5 +135,5 @@ SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep)
swapl(&rep->length);
swapl(&rep->focus);
swapl(&rep->time);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getfocus.h b/xorg-server/Xi/getfocus.h
index c3f2d67b6..6e90ae77b 100644
--- a/xorg-server/Xi/getfocus.h
+++ b/xorg-server/Xi/getfocus.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETFOCUS_H
#define GETFOCUS_H 1
-int SProcXGetDeviceFocus(ClientPtr /* client */
+int SProcXGetDeviceFocus(ClientPtr /* client */
);
-int ProcXGetDeviceFocus(ClientPtr /* client */
+int ProcXGetDeviceFocus(ClientPtr /* client */
);
void SRepXGetDeviceFocus(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceFocusReply * /* rep */
+ int /* size */ ,
+ xGetDeviceFocusReply * /* rep */
);
-#endif /* GETFOCUS_H */
+#endif /* GETFOCUS_H */
diff --git a/xorg-server/Xi/getkmap.c b/xorg-server/Xi/getkmap.c
index 2501ec05a..006be62a6 100644
--- a/xorg-server/Xi/getkmap.c
+++ b/xorg-server/Xi/getkmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -99,20 +99,20 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if (dev->key == NULL)
- return BadMatch;
+ return BadMatch;
xkb = dev->key->xkbInfo->desc;
if (stuff->firstKeyCode < xkb->min_key_code ||
- stuff->firstKeyCode > xkb->max_key_code) {
- client->errorValue = stuff->firstKeyCode;
- return BadValue;
+ stuff->firstKeyCode > xkb->max_key_code) {
+ client->errorValue = stuff->firstKeyCode;
+ return BadValue;
}
if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) {
- client->errorValue = stuff->count;
- return BadValue;
+ client->errorValue = stuff->count;
+ return BadValue;
}
syms = XkbGetCoreMap(dev);
@@ -123,7 +123,7 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
rep.RepType = X_GetDeviceKeyMapping;
rep.sequenceNumber = client->sequence;
rep.keySymsPerKeyCode = syms->mapWidth;
- rep.length = (syms->mapWidth * stuff->count); /* KeySyms are 4 bytes */
+ rep.length = (syms->mapWidth * stuff->count); /* KeySyms are 4 bytes */
WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep);
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write;
@@ -146,9 +146,9 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
void
SRepXGetDeviceKeyMapping(ClientPtr client, int size,
- xGetDeviceKeyMappingReply * rep)
+ xGetDeviceKeyMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getkmap.h b/xorg-server/Xi/getkmap.h
index 58c8f12e6..8f0ff8eec 100644
--- a/xorg-server/Xi/getkmap.h
+++ b/xorg-server/Xi/getkmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETKMAP_H
#define GETKMAP_H 1
-int SProcXGetDeviceKeyMapping(ClientPtr /* client */
+int SProcXGetDeviceKeyMapping(ClientPtr /* client */
);
-int ProcXGetDeviceKeyMapping(ClientPtr /* client */
+int ProcXGetDeviceKeyMapping(ClientPtr /* client */
);
void SRepXGetDeviceKeyMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceKeyMappingReply * /* rep */
+ int /* size */ ,
+ xGetDeviceKeyMappingReply * /* rep */
);
-#endif /* GETKMAP_H */
+#endif /* GETKMAP_H */
diff --git a/xorg-server/Xi/getmmap.c b/xorg-server/Xi/getmmap.c
index 4eee00679..3f8424373 100644
--- a/xorg-server/Xi/getmmap.c
+++ b/xorg-server/Xi/getmmap.c
@@ -54,9 +54,9 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h> /* Request macro */
+#include <X11/extensions/XIproto.h> /* Request macro */
#include "exglobals.h"
#include "getmmap.h"
@@ -95,7 +95,7 @@ ProcXGetDeviceModifierMapping(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (ret != Success)
- return ret;
+ return ret;
ret = generate_modkeymap(client, dev, &modkeymap, &max_keys_per_mod);
if (ret != Success)
@@ -125,9 +125,9 @@ ProcXGetDeviceModifierMapping(ClientPtr client)
void
SRepXGetDeviceModifierMapping(ClientPtr client, int size,
- xGetDeviceModifierMappingReply * rep)
+ xGetDeviceModifierMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getmmap.h b/xorg-server/Xi/getmmap.h
index 9a93bb8c5..d0a76df43 100644
--- a/xorg-server/Xi/getmmap.h
+++ b/xorg-server/Xi/getmmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETMMAP_H
#define GETMMAP_H 1
-int SProcXGetDeviceModifierMapping(ClientPtr /* client */
+int SProcXGetDeviceModifierMapping(ClientPtr /* client */
);
-int ProcXGetDeviceModifierMapping(ClientPtr /* client */
+int ProcXGetDeviceModifierMapping(ClientPtr /* client */
);
void SRepXGetDeviceModifierMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceModifierMappingReply * /* rep */
+ int /* size */ ,
+ xGetDeviceModifierMappingReply * /* rep */
);
-#endif /* GETMMAP_H */
+#endif /* GETMMAP_H */
diff --git a/xorg-server/Xi/getprop.h b/xorg-server/Xi/getprop.h
index 1a7b128b2..25fa0d901 100644
--- a/xorg-server/Xi/getprop.h
+++ b/xorg-server/Xi/getprop.h
@@ -30,22 +30,22 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETPROP_H
#define GETPROP_H 1
-int SProcXGetDeviceDontPropagateList(ClientPtr /* client */
+int SProcXGetDeviceDontPropagateList(ClientPtr /* client */
);
-int ProcXGetDeviceDontPropagateList(ClientPtr /* client */
+int ProcXGetDeviceDontPropagateList(ClientPtr /* client */
);
XEventClass *ClassFromMask(XEventClass * /* buf */ ,
- Mask /* mask */ ,
- int /* maskndx */ ,
- CARD16 * /* count */ ,
- int /* mode */
+ Mask /* mask */ ,
+ int /* maskndx */ ,
+ CARD16 * /* count */ ,
+ int /* mode */
);
void SRepXGetDeviceDontPropagateList(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceDontPropagateListReply * /* rep */
+ int /* size */ ,
+ xGetDeviceDontPropagateListReply * /* rep */
);
-#endif /* GETPROP_H */
+#endif /* GETPROP_H */
diff --git a/xorg-server/Xi/getselev.c b/xorg-server/Xi/getselev.c
index b316e2364..253c87fb5 100644
--- a/xorg-server/Xi/getselev.c
+++ b/xorg-server/Xi/getselev.c
@@ -56,8 +56,8 @@ SOFTWARE.
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window struct */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window struct */
#include "exglobals.h"
#include "swaprep.h"
@@ -111,45 +111,45 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if ((pOthers = wOtherInputMasks(pWin)) != 0) {
- for (others = pOthers->inputClients; others; others = others->next)
- for (i = 0; i < EMASKSIZE; i++)
- ClassFromMask(NULL, others->mask[i], i,
- &rep.all_clients_count, COUNT);
-
- for (others = pOthers->inputClients; others; others = others->next)
- if (SameClient(others, client)) {
- for (i = 0; i < EMASKSIZE; i++)
- ClassFromMask(NULL, others->mask[i], i,
- &rep.this_client_count, COUNT);
- break;
- }
-
- total_length = (rep.all_clients_count + rep.this_client_count) *
- sizeof(XEventClass);
- rep.length = bytes_to_int32(total_length);
- buf = (XEventClass *) malloc(total_length);
-
- tclient = buf;
- aclient = buf + rep.this_client_count;
- if (others)
- for (i = 0; i < EMASKSIZE; i++)
- tclient =
- ClassFromMask(tclient, others->mask[i], i, NULL, CREATE);
-
- for (others = pOthers->inputClients; others; others = others->next)
- for (i = 0; i < EMASKSIZE; i++)
- aclient =
- ClassFromMask(aclient, others->mask[i], i, NULL, CREATE);
+ for (others = pOthers->inputClients; others; others = others->next)
+ for (i = 0; i < EMASKSIZE; i++)
+ ClassFromMask(NULL, others->mask[i], i,
+ &rep.all_clients_count, COUNT);
+
+ for (others = pOthers->inputClients; others; others = others->next)
+ if (SameClient(others, client)) {
+ for (i = 0; i < EMASKSIZE; i++)
+ ClassFromMask(NULL, others->mask[i], i,
+ &rep.this_client_count, COUNT);
+ break;
+ }
+
+ total_length = (rep.all_clients_count + rep.this_client_count) *
+ sizeof(XEventClass);
+ rep.length = bytes_to_int32(total_length);
+ buf = (XEventClass *) malloc(total_length);
+
+ tclient = buf;
+ aclient = buf + rep.this_client_count;
+ if (others)
+ for (i = 0; i < EMASKSIZE; i++)
+ tclient =
+ ClassFromMask(tclient, others->mask[i], i, NULL, CREATE);
+
+ for (others = pOthers->inputClients; others; others = others->next)
+ for (i = 0; i < EMASKSIZE; i++)
+ aclient =
+ ClassFromMask(aclient, others->mask[i], i, NULL, CREATE);
}
WriteReplyToClient(client, sizeof(xGetSelectedExtensionEventsReply), &rep);
if (total_length) {
- client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, total_length, buf);
+ client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
+ WriteSwappedDataToClient(client, total_length, buf);
}
free(buf);
return Success;
@@ -164,11 +164,11 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
void
SRepXGetSelectedExtensionEvents(ClientPtr client, int size,
- xGetSelectedExtensionEventsReply * rep)
+ xGetSelectedExtensionEventsReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swaps(&rep->this_client_count);
swaps(&rep->all_clients_count);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getselev.h b/xorg-server/Xi/getselev.h
index 5e7a65914..371be1a27 100644
--- a/xorg-server/Xi/getselev.h
+++ b/xorg-server/Xi/getselev.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETSELEV_H
#define GETSELEV_H 1
-int SProcXGetSelectedExtensionEvents(ClientPtr /* client */
+int SProcXGetSelectedExtensionEvents(ClientPtr /* client */
);
-int ProcXGetSelectedExtensionEvents(ClientPtr /* client */
+int ProcXGetSelectedExtensionEvents(ClientPtr /* client */
);
void SRepXGetSelectedExtensionEvents(ClientPtr /* client */ ,
- int /* size */ ,
- xGetSelectedExtensionEventsReply * /* rep */
+ int /* size */ ,
+ xGetSelectedExtensionEventsReply * /* rep */
);
-#endif /* GETSELEV_H */
+#endif /* GETSELEV_H */
diff --git a/xorg-server/Xi/getvers.c b/xorg-server/Xi/getvers.c
index 8bea1c4b9..eb52c5b93 100644
--- a/xorg-server/Xi/getvers.c
+++ b/xorg-server/Xi/getvers.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
@@ -95,8 +95,8 @@ ProcXGetExtensionVersion(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
if (stuff->length != bytes_to_int32(sizeof(xGetExtensionVersionReq) +
- stuff->nbytes))
- return BadLength;
+ stuff->nbytes))
+ return BadLength;
memset(&rep, 0, sizeof(xGetExtensionVersionReply));
rep.repType = X_Reply;
@@ -121,11 +121,11 @@ ProcXGetExtensionVersion(ClientPtr client)
void
SRepXGetExtensionVersion(ClientPtr client, int size,
- xGetExtensionVersionReply * rep)
+ xGetExtensionVersionReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swaps(&rep->major_version);
swaps(&rep->minor_version);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getvers.h b/xorg-server/Xi/getvers.h
index c67e77a0f..11fec4b06 100644
--- a/xorg-server/Xi/getvers.h
+++ b/xorg-server/Xi/getvers.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETVERS_H
#define GETVERS_H 1
-int SProcXGetExtensionVersion(ClientPtr /* client */
+int SProcXGetExtensionVersion(ClientPtr /* client */
);
-int ProcXGetExtensionVersion(ClientPtr /* client */
+int ProcXGetExtensionVersion(ClientPtr /* client */
);
void SRepXGetExtensionVersion(ClientPtr /* client */ ,
- int /* size */ ,
- xGetExtensionVersionReply * /* rep */
+ int /* size */ ,
+ xGetExtensionVersionReply * /* rep */
);
-#endif /* GETVERS_H */
+#endif /* GETVERS_H */
diff --git a/xorg-server/Xi/grabdev.h b/xorg-server/Xi/grabdev.h
index 881982fd2..72e0fd692 100644
--- a/xorg-server/Xi/grabdev.h
+++ b/xorg-server/Xi/grabdev.h
@@ -30,23 +30,23 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GRABDEV_H
#define GRABDEV_H 1
-int SProcXGrabDevice(ClientPtr /* client */
+int SProcXGrabDevice(ClientPtr /* client */
);
-int ProcXGrabDevice(ClientPtr /* client */
+int ProcXGrabDevice(ClientPtr /* client */
);
int CreateMaskFromList(ClientPtr /* client */ ,
- XEventClass * /* list */ ,
- int /* count */ ,
- struct tmask /* mask */ [],
- DeviceIntPtr /* dev */ ,
- int /* req */
+ XEventClass * /* list */ ,
+ int /* count */ ,
+ struct tmask /* mask */ [],
+ DeviceIntPtr /* dev */ ,
+ int /* req */
);
void SRepXGrabDevice(ClientPtr /* client */ ,
- int /* size */ ,
- xGrabDeviceReply * /* rep */
+ int /* size */ ,
+ xGrabDeviceReply * /* rep */
);
-#endif /* GRABDEV_H */
+#endif /* GRABDEV_H */
diff --git a/xorg-server/Xi/grabdevb.h b/xorg-server/Xi/grabdevb.h
index 84a27b3d9..b2a9796b5 100644
--- a/xorg-server/Xi/grabdevb.h
+++ b/xorg-server/Xi/grabdevb.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GRABDEVB_H
#define GRABDEVB_H 1
-int SProcXGrabDeviceButton(ClientPtr /* client */
+int SProcXGrabDeviceButton(ClientPtr /* client */
);
-int ProcXGrabDeviceButton(ClientPtr /* client */
+int ProcXGrabDeviceButton(ClientPtr /* client */
);
-#endif /* GRABDEVB_H */
+#endif /* GRABDEVB_H */
diff --git a/xorg-server/Xi/grabdevk.h b/xorg-server/Xi/grabdevk.h
index e34913628..85738affa 100644
--- a/xorg-server/Xi/grabdevk.h
+++ b/xorg-server/Xi/grabdevk.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GRABDEVK_H
#define GRABDEVK_H 1
-int SProcXGrabDeviceKey(ClientPtr /* client */
+int SProcXGrabDeviceKey(ClientPtr /* client */
);
-int ProcXGrabDeviceKey(ClientPtr /* client */
+int ProcXGrabDeviceKey(ClientPtr /* client */
);
-#endif /* GRABDEVK_H */
+#endif /* GRABDEVK_H */
diff --git a/xorg-server/Xi/gtmotion.c b/xorg-server/Xi/gtmotion.c
index 34f167b40..48bc79af4 100644
--- a/xorg-server/Xi/gtmotion.c
+++ b/xorg-server/Xi/gtmotion.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
@@ -103,51 +103,51 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess);
if (rc != Success)
- return rc;
+ return rc;
v = dev->valuator;
if (v == NULL || v->numAxes == 0)
- return BadMatch;
+ return BadMatch;
if (dev->valuator->motionHintWindow)
- MaybeStopDeviceHint(dev, client);
+ MaybeStopDeviceHint(dev, client);
axes = v->numAxes;
rep.repType = X_Reply;
rep.RepType = X_GetDeviceMotionEvents;
rep.sequenceNumber = client->sequence;
rep.nEvents = 0;
rep.axes = axes;
- rep.mode = Absolute; /* XXX we don't do relative at the moment */
+ rep.mode = Absolute; /* XXX we don't do relative at the moment */
rep.length = 0;
start = ClientTimeToServerTime(stuff->start);
stop = ClientTimeToServerTime(stuff->stop);
if (CompareTimeStamps(start, stop) == LATER ||
- CompareTimeStamps(start, currentTime) == LATER) {
- WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
- return Success;
+ CompareTimeStamps(start, currentTime) == LATER) {
+ WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
+ return Success;
}
if (CompareTimeStamps(stop, currentTime) == LATER)
- stop = currentTime;
+ stop = currentTime;
num_events = v->numMotionEvents;
if (num_events) {
size = sizeof(Time) + (axes * sizeof(INT32));
- rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords,/* XXX */
- start.milliseconds, stop.milliseconds,
- (ScreenPtr) NULL, FALSE);
+ rep.nEvents = GetMotionHistory(dev, (xTimecoord **) & coords, /* XXX */
+ start.milliseconds, stop.milliseconds,
+ (ScreenPtr) NULL, FALSE);
}
if (rep.nEvents > 0) {
- length = bytes_to_int32(rep.nEvents * size);
- rep.length = length;
+ length = bytes_to_int32(rep.nEvents * size);
+ rep.length = length;
}
nEvents = rep.nEvents;
WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
if (nEvents) {
- if (client->swapped) {
- bufptr = coords;
- for (i = 0; i < nEvents * (axes + 1); i++) {
- swapl(bufptr);
- bufptr++;
- }
- }
- WriteToClient(client, length * 4, (char *)coords);
+ if (client->swapped) {
+ bufptr = coords;
+ for (i = 0; i < nEvents * (axes + 1); i++) {
+ swapl(bufptr);
+ bufptr++;
+ }
+ }
+ WriteToClient(client, length * 4, (char *) coords);
}
free(coords);
return Success;
@@ -162,10 +162,10 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
void
SRepXGetDeviceMotionEvents(ClientPtr client, int size,
- xGetDeviceMotionEventsReply * rep)
+ xGetDeviceMotionEventsReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swapl(&rep->nEvents);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/gtmotion.h b/xorg-server/Xi/gtmotion.h
index cdd8825cc..f62bf578c 100644
--- a/xorg-server/Xi/gtmotion.h
+++ b/xorg-server/Xi/gtmotion.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GTMOTION_H
#define GTMOTION_H 1
-int SProcXGetDeviceMotionEvents(ClientPtr /* client */
+int SProcXGetDeviceMotionEvents(ClientPtr /* client */
);
-int ProcXGetDeviceMotionEvents(ClientPtr /* client */
+int ProcXGetDeviceMotionEvents(ClientPtr /* client */
);
void SRepXGetDeviceMotionEvents(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceMotionEventsReply * /* rep */
+ int /* size */ ,
+ xGetDeviceMotionEventsReply * /* rep */
);
-#endif /* GTMOTION_H */
+#endif /* GTMOTION_H */
diff --git a/xorg-server/Xi/listdev.h b/xorg-server/Xi/listdev.h
index b0d2dd5e2..39ea2389f 100644
--- a/xorg-server/Xi/listdev.h
+++ b/xorg-server/Xi/listdev.h
@@ -30,17 +30,17 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef LISTDEV_H
#define LISTDEV_H 1
-#define VPC 20 /* Max # valuators per chunk */
+#define VPC 20 /* Max # valuators per chunk */
-int SProcXListInputDevices(ClientPtr /* client */
+int SProcXListInputDevices(ClientPtr /* client */
);
-int ProcXListInputDevices(ClientPtr /* client */
+int ProcXListInputDevices(ClientPtr /* client */
);
void SRepXListInputDevices(ClientPtr /* client */ ,
- int /* size */ ,
- xListInputDevicesReply * /* rep */
+ int /* size */ ,
+ xListInputDevicesReply * /* rep */
);
-#endif /* LISTDEV_H */
+#endif /* LISTDEV_H */
diff --git a/xorg-server/Xi/opendev.h b/xorg-server/Xi/opendev.h
index 9665fe9cb..e2d806197 100644
--- a/xorg-server/Xi/opendev.h
+++ b/xorg-server/Xi/opendev.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef OPENDEV_H
#define OPENDEV_H 1
-int SProcXOpenDevice(ClientPtr /* client */
+int SProcXOpenDevice(ClientPtr /* client */
);
-int ProcXOpenDevice(ClientPtr /* client */
+int ProcXOpenDevice(ClientPtr /* client */
);
void SRepXOpenDevice(ClientPtr /* client */ ,
- int /* size */ ,
- xOpenDeviceReply * /* rep */
+ int /* size */ ,
+ xOpenDeviceReply * /* rep */
);
-#endif /* OPENDEV_H */
+#endif /* OPENDEV_H */
diff --git a/xorg-server/Xi/queryst.h b/xorg-server/Xi/queryst.h
index 9232ff666..5619ca59d 100644
--- a/xorg-server/Xi/queryst.h
+++ b/xorg-server/Xi/queryst.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef QUERYST_H
#define QUERYST_H 1
-int SProcXQueryDeviceState(ClientPtr /* client */
+int SProcXQueryDeviceState(ClientPtr /* client */
);
-int ProcXQueryDeviceState(ClientPtr /* client */
+int ProcXQueryDeviceState(ClientPtr /* client */
);
void SRepXQueryDeviceState(ClientPtr /* client */ ,
- int /* size */ ,
- xQueryDeviceStateReply * /* rep */
+ int /* size */ ,
+ xQueryDeviceStateReply * /* rep */
);
-#endif /* QUERYST_H */
+#endif /* QUERYST_H */
diff --git a/xorg-server/Xi/selectev.h b/xorg-server/Xi/selectev.h
index 60fb4476b..e80fe4a43 100644
--- a/xorg-server/Xi/selectev.h
+++ b/xorg-server/Xi/selectev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SELECTEV_H
#define SELECTEV_H 1
-int SProcXSelectExtensionEvent(ClientPtr /* client */
+int SProcXSelectExtensionEvent(ClientPtr /* client */
);
-int ProcXSelectExtensionEvent(ClientPtr /* client */
+int ProcXSelectExtensionEvent(ClientPtr /* client */
);
-#endif /* SELECTEV_H */
+#endif /* SELECTEV_H */
diff --git a/xorg-server/Xi/sendexev.h b/xorg-server/Xi/sendexev.h
index e156f1ba2..38c66434d 100644
--- a/xorg-server/Xi/sendexev.h
+++ b/xorg-server/Xi/sendexev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SENDEXEV_H
#define SENDEXEV_H 1
-int SProcXSendExtensionEvent(ClientPtr /* client */
+int SProcXSendExtensionEvent(ClientPtr /* client */
);
-int ProcXSendExtensionEvent(ClientPtr /* client */
+int ProcXSendExtensionEvent(ClientPtr /* client */
);
-#endif /* SENDEXEV_H */
+#endif /* SENDEXEV_H */
diff --git a/xorg-server/Xi/setbmap.h b/xorg-server/Xi/setbmap.h
index 20ad8e077..8d73f23b4 100644
--- a/xorg-server/Xi/setbmap.h
+++ b/xorg-server/Xi/setbmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETBMAP_H
#define SETBMAP_H 1
-int SProcXSetDeviceButtonMapping(ClientPtr /* client */
+int SProcXSetDeviceButtonMapping(ClientPtr /* client */
);
-int ProcXSetDeviceButtonMapping(ClientPtr /* client */
+int ProcXSetDeviceButtonMapping(ClientPtr /* client */
);
void SRepXSetDeviceButtonMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceButtonMappingReply * /* rep */
+ int /* size */ ,
+ xSetDeviceButtonMappingReply * /* rep */
);
-#endif /* SETBMAP_H */
+#endif /* SETBMAP_H */
diff --git a/xorg-server/Xi/setdval.c b/xorg-server/Xi/setdval.c
index ea17852f7..542f20dd8 100644
--- a/xorg-server/Xi/setdval.c
+++ b/xorg-server/Xi/setdval.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
@@ -99,27 +99,27 @@ ProcXSetDeviceValuators(ClientPtr client)
rep.sequenceNumber = client->sequence;
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
- stuff->num_valuators)
- return BadLength;
+ stuff->num_valuators)
+ return BadLength;
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if (dev->valuator == NULL)
- return BadMatch;
+ return BadMatch;
if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes)
- return BadValue;
+ return BadValue;
if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client))
- rep.status = AlreadyGrabbed;
+ rep.status = AlreadyGrabbed;
else
- rep.status = SetDeviceValuators(client, dev, (int *)&stuff[1],
- stuff->first_valuator,
- stuff->num_valuators);
+ rep.status = SetDeviceValuators(client, dev, (int *) &stuff[1],
+ stuff->first_valuator,
+ stuff->num_valuators);
if (rep.status != Success && rep.status != AlreadyGrabbed)
- return rep.status;
+ return rep.status;
WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep);
return Success;
@@ -134,9 +134,9 @@ ProcXSetDeviceValuators(ClientPtr client)
void
SRepXSetDeviceValuators(ClientPtr client, int size,
- xSetDeviceValuatorsReply * rep)
+ xSetDeviceValuatorsReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/setdval.h b/xorg-server/Xi/setdval.h
index 40b431784..05642743a 100644
--- a/xorg-server/Xi/setdval.h
+++ b/xorg-server/Xi/setdval.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETDVAL_H
#define SETDVAL_H 1
-int SProcXSetDeviceValuators(ClientPtr /* client */
+int SProcXSetDeviceValuators(ClientPtr /* client */
);
-int ProcXSetDeviceValuators(ClientPtr /* client */
+int ProcXSetDeviceValuators(ClientPtr /* client */
);
void SRepXSetDeviceValuators(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceValuatorsReply * /* rep */
+ int /* size */ ,
+ xSetDeviceValuatorsReply * /* rep */
);
-#endif /* SETDVAL_H */
+#endif /* SETDVAL_H */
diff --git a/xorg-server/Xi/setfocus.c b/xorg-server/Xi/setfocus.c
index feec3fc35..809184189 100644
--- a/xorg-server/Xi/setfocus.c
+++ b/xorg-server/Xi/setfocus.c
@@ -54,8 +54,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "windowstr.h" /* focus struct */
-#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* focus struct */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
@@ -99,12 +99,12 @@ ProcXSetDeviceFocus(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->device, client, DixSetFocusAccess);
if (ret != Success)
- return ret;
+ return ret;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo,
- stuff->time, TRUE);
+ stuff->time, TRUE);
return ret;
}
diff --git a/xorg-server/Xi/setfocus.h b/xorg-server/Xi/setfocus.h
index 3a49f8440..0adf45157 100644
--- a/xorg-server/Xi/setfocus.h
+++ b/xorg-server/Xi/setfocus.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETFOCUS_H
#define SETFOCUS_H 1
-int SProcXSetDeviceFocus(ClientPtr /* client */
+int SProcXSetDeviceFocus(ClientPtr /* client */
);
-int ProcXSetDeviceFocus(ClientPtr /* client */
+int ProcXSetDeviceFocus(ClientPtr /* client */
);
-#endif /* SETFOCUS_H */
+#endif /* SETFOCUS_H */
diff --git a/xorg-server/Xi/setmmap.c b/xorg-server/Xi/setmmap.c
index dc6d828a1..36845d706 100644
--- a/xorg-server/Xi/setmmap.c
+++ b/xorg-server/Xi/setmmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XI2.h>
#include <X11/extensions/XIproto.h>
@@ -95,7 +95,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) +
- (stuff->numKeyPerModifier << 1))
+ (stuff->numKeyPerModifier << 1))
return BadLength;
rep.repType = X_Reply;
@@ -113,9 +113,9 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
ret = MappingSuccess;
if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) {
- rep.success = ret;
- WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
- &rep);
+ rep.success = ret;
+ WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
+ &rep);
}
else if (ret == -1) {
return BadValue;
@@ -136,9 +136,9 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
void
SRepXSetDeviceModifierMapping(ClientPtr client, int size,
- xSetDeviceModifierMappingReply * rep)
+ xSetDeviceModifierMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/setmmap.h b/xorg-server/Xi/setmmap.h
index 9b345da7c..9347b9679 100644
--- a/xorg-server/Xi/setmmap.h
+++ b/xorg-server/Xi/setmmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETMMAP_H
#define SETMMAP_H 1
-int SProcXSetDeviceModifierMapping(ClientPtr /* client */
+int SProcXSetDeviceModifierMapping(ClientPtr /* client */
);
-int ProcXSetDeviceModifierMapping(ClientPtr /* client */
+int ProcXSetDeviceModifierMapping(ClientPtr /* client */
);
void SRepXSetDeviceModifierMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceModifierMappingReply * /* rep */
+ int /* size */ ,
+ xSetDeviceModifierMappingReply * /* rep */
);
-#endif /* SETMMAP_H */
+#endif /* SETMMAP_H */
diff --git a/xorg-server/Xi/setmode.h b/xorg-server/Xi/setmode.h
index 021bfa02d..d01bfffd3 100644
--- a/xorg-server/Xi/setmode.h
+++ b/xorg-server/Xi/setmode.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETMODE_H
#define SETMODE_H 1
-int SProcXSetDeviceMode(ClientPtr /* client */
+int SProcXSetDeviceMode(ClientPtr /* client */
);
-int ProcXSetDeviceMode(ClientPtr /* client */
+int ProcXSetDeviceMode(ClientPtr /* client */
);
void SRepXSetDeviceMode(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceModeReply * /* rep */
+ int /* size */ ,
+ xSetDeviceModeReply * /* rep */
);
-#endif /* SETMODE_H */
+#endif /* SETMODE_H */
diff --git a/xorg-server/Xi/ungrdev.c b/xorg-server/Xi/ungrdev.c
index 58c1f57ef..162a00abf 100644
--- a/xorg-server/Xi/ungrdev.c
+++ b/xorg-server/Xi/ungrdev.c
@@ -54,8 +54,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -96,13 +96,13 @@ ProcXUngrabDevice(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
grab = dev->deviceGrab.grab;
time = ClientTimeToServerTime(stuff->time);
if ((CompareTimeStamps(time, currentTime) != LATER) &&
- (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) &&
- (grab) && SameClient(grab, client) && grab->grabtype == XI)
- (*dev->deviceGrab.DeactivateGrab) (dev);
+ (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) &&
+ (grab) && SameClient(grab, client) && grab->grabtype == XI)
+ (*dev->deviceGrab.DeactivateGrab) (dev);
return Success;
}
diff --git a/xorg-server/Xi/ungrdev.h b/xorg-server/Xi/ungrdev.h
index 8e3c210a3..8a85c27f1 100644
--- a/xorg-server/Xi/ungrdev.h
+++ b/xorg-server/Xi/ungrdev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef UNGRDEV_H
#define UNGRDEV_H 1
-int SProcXUngrabDevice(ClientPtr /* client */
+int SProcXUngrabDevice(ClientPtr /* client */
);
-int ProcXUngrabDevice(ClientPtr /* client */
+int ProcXUngrabDevice(ClientPtr /* client */
);
-#endif /* UNGRDEV_H */
+#endif /* UNGRDEV_H */
diff --git a/xorg-server/Xi/ungrdevb.h b/xorg-server/Xi/ungrdevb.h
index 400d61d9e..97d8aede1 100644
--- a/xorg-server/Xi/ungrdevb.h
+++ b/xorg-server/Xi/ungrdevb.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef UNGRDEVB_H
#define UNGRDEVB_H 1
-int SProcXUngrabDeviceButton(ClientPtr /* client */
+int SProcXUngrabDeviceButton(ClientPtr /* client */
);
-int ProcXUngrabDeviceButton(ClientPtr /* client */
+int ProcXUngrabDeviceButton(ClientPtr /* client */
);
-#endif /* UNGRDEVB_H */
+#endif /* UNGRDEVB_H */
diff --git a/xorg-server/Xi/ungrdevk.h b/xorg-server/Xi/ungrdevk.h
index 9dec17a10..1c4bab65b 100644
--- a/xorg-server/Xi/ungrdevk.h
+++ b/xorg-server/Xi/ungrdevk.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef UNGRDEVK_H
#define UNGRDEVK_H 1
-int SProcXUngrabDeviceKey(ClientPtr /* client */
+int SProcXUngrabDeviceKey(ClientPtr /* client */
);
-int ProcXUngrabDeviceKey(ClientPtr /* client */
+int ProcXUngrabDeviceKey(ClientPtr /* client */
);
-#endif /* UNGRDEVK_H */
+#endif /* UNGRDEVK_H */
diff --git a/xorg-server/Xi/xiallowev.h b/xorg-server/Xi/xiallowev.h
index 3a417b9b1..c24ac3df4 100644
--- a/xorg-server/Xi/xiallowev.h
+++ b/xorg-server/Xi/xiallowev.h
@@ -33,4 +33,4 @@
int ProcXIAllowEvents(ClientPtr client);
int SProcXIAllowEvents(ClientPtr client);
-#endif /* XIALLOWEV_H */
+#endif /* XIALLOWEV_H */
diff --git a/xorg-server/Xi/xichangecursor.h b/xorg-server/Xi/xichangecursor.h
index dc6ccb1af..14477772a 100644
--- a/xorg-server/Xi/xichangecursor.h
+++ b/xorg-server/Xi/xichangecursor.h
@@ -30,7 +30,7 @@
#ifndef CHDEVCUR_H
#define CHDEVCUR_H 1
-int SProcXIChangeCursor(ClientPtr /* client */);
-int ProcXIChangeCursor(ClientPtr /* client */);
+int SProcXIChangeCursor(ClientPtr /* client */ );
+int ProcXIChangeCursor(ClientPtr /* client */ );
-#endif /* CHDEVCUR_H */
+#endif /* CHDEVCUR_H */
diff --git a/xorg-server/Xi/xichangehierarchy.h b/xorg-server/Xi/xichangehierarchy.h
index 483c6cd72..8ec1915ae 100644
--- a/xorg-server/Xi/xichangehierarchy.h
+++ b/xorg-server/Xi/xichangehierarchy.h
@@ -36,9 +36,9 @@
#ifndef CHDEVHIER_H
#define CHDEVHIER_H 1
-int SProcXIChangeHierarchy(ClientPtr /* client */);
-int ProcXIChangeHierarchy(ClientPtr /* client */);
+int SProcXIChangeHierarchy(ClientPtr /* client */ );
+int ProcXIChangeHierarchy(ClientPtr /* client */ );
void XISendDeviceHierarchyEvent(int flags[]);
-#endif /* CHDEVHIER_H */
+#endif /* CHDEVHIER_H */
diff --git a/xorg-server/Xi/xigetclientpointer.h b/xorg-server/Xi/xigetclientpointer.h
index 1539aa8a9..4ecf42cca 100644
--- a/xorg-server/Xi/xigetclientpointer.h
+++ b/xorg-server/Xi/xigetclientpointer.h
@@ -29,10 +29,10 @@
#ifndef GETCPTR_H
#define GETCPTR_H 1
-int SProcXIGetClientPointer(ClientPtr /* client */);
-int ProcXIGetClientPointer(ClientPtr /* client */);
-void SRepXIGetClientPointer(ClientPtr /* client */,
- int /* size */,
- xXIGetClientPointerReply* /* rep */);
+int SProcXIGetClientPointer(ClientPtr /* client */ );
+int ProcXIGetClientPointer(ClientPtr /* client */ );
+void SRepXIGetClientPointer(ClientPtr /* client */ ,
+ int /* size */ ,
+ xXIGetClientPointerReply * /* rep */ );
-#endif /* GETCPTR_H */
+#endif /* GETCPTR_H */
diff --git a/xorg-server/Xi/xigrabdev.h b/xorg-server/Xi/xigrabdev.h
index 08309c932..e5aa702c5 100644
--- a/xorg-server/Xi/xigrabdev.h
+++ b/xorg-server/Xi/xigrabdev.h
@@ -38,4 +38,4 @@ int SProcXIUngrabDevice(ClientPtr client);
void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep);
-#endif /* XIGRABDEV_H */
+#endif /* XIGRABDEV_H */
diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c
index 749bc24c9..15c8b2a7b 100644
--- a/xorg-server/Xi/xiquerydevice.c
+++ b/xorg-server/Xi/xiquerydevice.c
@@ -430,7 +430,7 @@ ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch)
{
touch->type = XITouchClass;
touch->length = sizeof(xXITouchInfo) >> 2;
- touch->sourceid = touch->sourceid;
+ touch->sourceid = dev->touch->sourceid;
touch->mode = dev->touch->mode;
touch->num_touches = dev->touch->num_touches;
diff --git a/xorg-server/Xi/xiquerydevice.h b/xorg-server/Xi/xiquerydevice.h
index 632c42eeb..8a180bf39 100644
--- a/xorg-server/Xi/xiquerydevice.h
+++ b/xorg-server/Xi/xiquerydevice.h
@@ -35,15 +35,15 @@
int SProcXIQueryDevice(ClientPtr client);
int ProcXIQueryDevice(ClientPtr client);
-void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep);
+void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply * rep);
int SizeDeviceClasses(DeviceIntPtr dev);
int ListDeviceClasses(ClientPtr client, DeviceIntPtr dev,
- char* any, uint16_t* nclasses);
-int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment);
-int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState);
-int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info);
-int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info,
- int axisnumber, Bool reportState);
-int ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo* info, int axisnumber);
-int ListTouchInfo(DeviceIntPtr dev, xXITouchInfo* info);
-#endif /* QUERYDEV_H */
+ char *any, uint16_t * nclasses);
+int GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment);
+int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState);
+int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info);
+int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info,
+ int axisnumber, Bool reportState);
+int ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info, int axisnumber);
+int ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * info);
+#endif /* QUERYDEV_H */
diff --git a/xorg-server/Xi/xiquerypointer.h b/xorg-server/Xi/xiquerypointer.h
index ea22376a6..a6bc4ce95 100644
--- a/xorg-server/Xi/xiquerypointer.h
+++ b/xorg-server/Xi/xiquerypointer.h
@@ -30,10 +30,10 @@
#ifndef QUERYDP_H
#define QUERYDP_H 1
-int SProcXIQueryPointer(ClientPtr /* client */);
-int ProcXIQueryPointer(ClientPtr /* client */);
+int SProcXIQueryPointer(ClientPtr /* client */ );
+int ProcXIQueryPointer(ClientPtr /* client */ );
void SRepXIQueryPointer(ClientPtr /* client */ ,
- int /* size */ ,
- xXIQueryPointerReply * /* rep */);
+ int /* size */ ,
+ xXIQueryPointerReply * /* rep */ );
-#endif /* QUERYDP_H */
+#endif /* QUERYDP_H */
diff --git a/xorg-server/Xi/xiqueryversion.h b/xorg-server/Xi/xiqueryversion.h
index 06bb7291a..6dcedacc0 100644
--- a/xorg-server/Xi/xiqueryversion.h
+++ b/xorg-server/Xi/xiqueryversion.h
@@ -35,6 +35,6 @@
int SProcXIQueryVersion(ClientPtr client);
int ProcXIQueryVersion(ClientPtr client);
-void SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply* rep);
+void SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep);
-#endif /* QUERYVERSION_H */
+#endif /* QUERYVERSION_H */
diff --git a/xorg-server/Xi/xiselectev.h b/xorg-server/Xi/xiselectev.h
index 21ec9371b..56681d398 100644
--- a/xorg-server/Xi/xiselectev.h
+++ b/xorg-server/Xi/xiselectev.h
@@ -35,6 +35,6 @@ int ProcXISelectEvents(ClientPtr client);
int SProcXIGetSelectedEvents(ClientPtr client);
int ProcXIGetSelectedEvents(ClientPtr client);
void SRepXIGetSelectedEvents(ClientPtr client,
- int len, xXIGetSelectedEventsReply *rep);
+ int len, xXIGetSelectedEventsReply * rep);
-#endif /* _XISELECTEVENTS_H_ */
+#endif /* _XISELECTEVENTS_H_ */
diff --git a/xorg-server/Xi/xisetclientpointer.h b/xorg-server/Xi/xisetclientpointer.h
index 5968d98da..f5c15bf49 100644
--- a/xorg-server/Xi/xisetclientpointer.h
+++ b/xorg-server/Xi/xisetclientpointer.h
@@ -30,7 +30,7 @@
#ifndef SETCPTR_H
#define SETCPTR_H 1
-int SProcXISetClientPointer(ClientPtr /* client */);
-int ProcXISetClientPointer(ClientPtr /* client */);
+int SProcXISetClientPointer(ClientPtr /* client */ );
+int ProcXISetClientPointer(ClientPtr /* client */ );
-#endif /* SETCPTR_H */
+#endif /* SETCPTR_H */
diff --git a/xorg-server/Xi/xisetdevfocus.c b/xorg-server/Xi/xisetdevfocus.c
index 294df7c32..b52c9cc99 100644
--- a/xorg-server/Xi/xisetdevfocus.c
+++ b/xorg-server/Xi/xisetdevfocus.c
@@ -32,12 +32,12 @@
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include <X11/extensions/XI2.h>
#include <X11/extensions/XI2proto.h>
-#include "exglobals.h" /* BadDevice */
+#include "exglobals.h" /* BadDevice */
#include "xisetdevfocus.h"
int
@@ -73,12 +73,12 @@ ProcXISetFocus(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetFocusAccess);
if (ret != Success)
- return ret;
+ return ret;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
return SetInputFocus(client, dev, stuff->focus, RevertToParent,
- stuff->time, TRUE);
+ stuff->time, TRUE);
}
int
@@ -93,9 +93,9 @@ ProcXIGetFocus(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess);
if (ret != Success)
- return ret;
+ return ret;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
rep.repType = X_Reply;
rep.RepType = X_XIGetFocus;
@@ -103,23 +103,23 @@ ProcXIGetFocus(ClientPtr client)
rep.sequenceNumber = client->sequence;
if (dev->focus->win == NoneWin)
- rep.focus = None;
+ rep.focus = None;
else if (dev->focus->win == PointerRootWin)
- rep.focus = PointerRoot;
+ rep.focus = PointerRoot;
else if (dev->focus->win == FollowKeyboardWin)
- rep.focus = FollowKeyboard;
+ rep.focus = FollowKeyboard;
else
- rep.focus = dev->focus->win->drawable.id;
+ rep.focus = dev->focus->win->drawable.id;
WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep);
return Success;
}
void
-SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep)
+SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swapl(&rep->focus);
- WriteToClient(client, len, (char *)rep);
+ WriteToClient(client, len, (char *) rep);
}
diff --git a/xorg-server/Xi/xisetdevfocus.h b/xorg-server/Xi/xisetdevfocus.h
index 2c3243d86..0865a72d4 100644
--- a/xorg-server/Xi/xisetdevfocus.h
+++ b/xorg-server/Xi/xisetdevfocus.h
@@ -36,5 +36,5 @@ int ProcXISetFocus(ClientPtr client);
int SProcXIGetFocus(ClientPtr client);
int ProcXIGetFocus(ClientPtr client);
-void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply* rep);
-#endif /* XISETDEVFOCUS_H */
+void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep);
+#endif /* XISETDEVFOCUS_H */
diff --git a/xorg-server/Xi/xiwarppointer.h b/xorg-server/Xi/xiwarppointer.h
index aafc73904..7637f422a 100644
--- a/xorg-server/Xi/xiwarppointer.h
+++ b/xorg-server/Xi/xiwarppointer.h
@@ -30,7 +30,7 @@
#ifndef WARPDEVP_H
#define WARPDEVP_H 1
-int SProcXIWarpPointer(ClientPtr /* client */);
-int ProcXIWarpPointer(ClientPtr /* client */);
+int SProcXIWarpPointer(ClientPtr /* client */ );
+int ProcXIWarpPointer(ClientPtr /* client */ );
-#endif /* WARPDEVP_H */
+#endif /* WARPDEVP_H */