summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-03-03 14:39:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-03-11 14:26:07 +1000
commit5f4058db225d7cb4455fd27b11dff10422e94748 (patch)
tree3abc40bbf02d850d31624a6e33ee97d968c109af /src
parent2d5bdbe0fad5f22f153aa74e38aa3a1ca09d4192 (diff)
Replace all XDevice* with ints.
There's no reason to have XDevice structs. It's not as if they carry useful information.
Diffstat (limited to 'src')
-rw-r--r--src/XChDevHier.c12
-rw-r--r--src/XDefDevCur.c4
-rw-r--r--src/XQueryDvPtr.c4
-rw-r--r--src/XSetCPtr.c4
-rw-r--r--src/XUndefDevCur.c4
-rw-r--r--src/XWarpDvPtr.c4
6 files changed, 16 insertions, 16 deletions
diff --git a/src/XChDevHier.c b/src/XChDevHier.c
index b9d96f2..f72b73d 100644
--- a/src/XChDevHier.c
+++ b/src/XChDevHier.c
@@ -113,12 +113,12 @@ XIChangeDeviceHierarchy(Display* dpy,
xXIRemoveMasterInfo* r = (xXIRemoveMasterInfo*)dptr;
r->type = R->type;
r->return_mode = R->returnMode;
- r->deviceid = R->device->device_id;
+ r->deviceid = R->device;
r->length = sizeof(xXIRemoveMasterInfo)/4;
if (r->return_mode == AttachToMaster)
{
- r->return_pointer = R->returnPointer->device_id;
- r->return_keyboard = R->returnKeyboard->device_id;
+ r->return_pointer = R->returnPointer;
+ r->return_keyboard = R->returnKeyboard;
}
dptr += sizeof(xXIRemoveMasterInfo);
}
@@ -129,9 +129,9 @@ XIChangeDeviceHierarchy(Display* dpy,
xXIAttachSlaveInfo* c = (xXIAttachSlaveInfo*)dptr;
c->type = C->type;
- c->deviceid = C->device->device_id;
+ c->deviceid = C->device;
c->length = sizeof(xXIAttachSlaveInfo)/4;
- c->new_master = C->newMaster->device_id;
+ c->new_master = C->newMaster;
dptr += sizeof(xXIAttachSlaveInfo);
}
@@ -142,7 +142,7 @@ XIChangeDeviceHierarchy(Display* dpy,
xXIDetachSlaveInfo *d = (xXIDetachSlaveInfo*)dptr;
d->type = D->type;
- d->deviceid = D->device->device_id;
+ d->deviceid = D->device;
d->length = sizeof(xXIDetachSlaveInfo)/4;
dptr += sizeof(xXIDetachSlaveInfo);
}
diff --git a/src/XDefDevCur.c b/src/XDefDevCur.c
index b21d7fa..4826021 100644
--- a/src/XDefDevCur.c
+++ b/src/XDefDevCur.c
@@ -38,7 +38,7 @@ in this Software without prior written authorization from The Open Group.
#include "XIint.h"
-int XIDefineDeviceCursor(Display *dpy, XDevice* dev, Window w, Cursor cursor)
+int XIDefineDeviceCursor(Display *dpy, int deviceid, Window w, Cursor cursor)
{
xXIChangeDeviceCursorReq *req;
@@ -51,7 +51,7 @@ int XIDefineDeviceCursor(Display *dpy, XDevice* dev, Window w, Cursor cursor)
GetReq(XIChangeDeviceCursor, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_XIChangeDeviceCursor;
- req->deviceid = dev->device_id;
+ req->deviceid = deviceid;
req->win = w;
req->cursor = cursor;
UnlockDisplay(dpy);
diff --git a/src/XQueryDvPtr.c b/src/XQueryDvPtr.c
index 2adc1c2..e1b3332 100644
--- a/src/XQueryDvPtr.c
+++ b/src/XQueryDvPtr.c
@@ -40,7 +40,7 @@ in this Software without prior written authorization from The Open Group.
Bool
XIQueryDevicePointer(Display *dpy,
- XDevice *dev,
+ int deviceid,
Window w,
Window *root,
Window *child,
@@ -62,7 +62,7 @@ XIQueryDevicePointer(Display *dpy,
GetReq(XIQueryDevicePointer, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_XIQueryDevicePointer;
- req->deviceid = dev->device_id;
+ req->deviceid = deviceid;
req->win = w;
if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
diff --git a/src/XSetCPtr.c b/src/XSetCPtr.c
index 1c92812..952c0d4 100644
--- a/src/XSetCPtr.c
+++ b/src/XSetCPtr.c
@@ -42,7 +42,7 @@ in this Software without prior written authorization from The Open Group.
#include "XIint.h"
Status
-XISetClientPointer(Display* dpy, Window win, XDevice* device)
+XISetClientPointer(Display* dpy, Window win, int deviceid)
{
xXISetClientPointerReq* req;
XExtDisplayInfo *info = XInput_find_display(dpy);
@@ -55,7 +55,7 @@ XISetClientPointer(Display* dpy, Window win, XDevice* device)
req->reqType = info->codes->major_opcode;
req->ReqType = X_XISetClientPointer;
req->win = win;
- req->deviceid = device->device_id;
+ req->deviceid = deviceid;
UnlockDisplay(dpy);
SyncHandle();
diff --git a/src/XUndefDevCur.c b/src/XUndefDevCur.c
index 81e312e..ef358e2 100644
--- a/src/XUndefDevCur.c
+++ b/src/XUndefDevCur.c
@@ -37,8 +37,8 @@ in this Software without prior written authorization from The Open Group.
#include "XIint.h"
-int XIUndefineDeviceCursor(Display *dpy, XDevice* dev, Window w)
+int XIUndefineDeviceCursor(Display *dpy, int deviceid, Window w)
{
- return XIDefineDeviceCursor(dpy, dev, w, None);
+ return XIDefineDeviceCursor(dpy, deviceid, w, None);
}
diff --git a/src/XWarpDvPtr.c b/src/XWarpDvPtr.c
index 6a9c45d..85ce5ab 100644
--- a/src/XWarpDvPtr.c
+++ b/src/XWarpDvPtr.c
@@ -40,7 +40,7 @@ in this Software without prior written authorization from The Open Group.
int
XIWarpDevicePointer(Display *dpy,
- XDevice *dev,
+ int deviceid,
Window src_win,
Window dst_win,
int src_x,
@@ -61,7 +61,7 @@ XIWarpDevicePointer(Display *dpy,
GetReq(XIWarpDevicePointer, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_XIWarpDevicePointer;
- req->deviceid = dev->device_id;
+ req->deviceid = deviceid;
req->src_win = src_win;
req->dst_win = dst_win;
req->src_x = src_x;