summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Cursor.c30
-rw-r--r--src/Disconnect.c4
-rw-r--r--src/Region.c66
-rw-r--r--src/SaveSet.c8
-rw-r--r--src/Selection.c2
-rw-r--r--src/Xfixes.c10
6 files changed, 60 insertions, 60 deletions
diff --git a/src/Cursor.c b/src/Cursor.c
index 34f534d..900efb3 100644
--- a/src/Cursor.c
+++ b/src/Cursor.c
@@ -61,7 +61,7 @@ XFixesSelectCursorInput (Display *dpy,
LockDisplay (dpy);
GetReq (XFixesSelectCursorInput, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSelectCursorInput;
req->window = (CARD32) win;
req->eventMask = (CARD32) eventMask;
@@ -84,7 +84,7 @@ XFixesGetCursorImage (Display *dpy)
XFixesCheckExtension (dpy, info, NULL);
LockDisplay (dpy);
GetReq (XFixesGetCursorImageAndName, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
if (info->major_version >= 2)
req->xfixesReqType = X_XFixesGetCursorImageAndName;
else
@@ -162,7 +162,7 @@ XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name)
return;
LockDisplay (dpy);
GetReq (XFixesSetCursorName, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSetCursorName;
req->cursor = (CARD32) cursor;
req->nbytes = nbytes;
@@ -185,7 +185,7 @@ XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom)
return NULL;
LockDisplay (dpy);
GetReq (XFixesGetCursorName, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesGetCursorName;
req->cursor = (CARD32) cursor;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
@@ -218,7 +218,7 @@ XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination)
return;
LockDisplay (dpy);
GetReq (XFixesChangeCursor, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesChangeCursor;
req->source = (CARD32) source;
req->destination = (CARD32) destination;
@@ -238,7 +238,7 @@ XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name)
return;
LockDisplay (dpy);
GetReq (XFixesChangeCursorByName, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesChangeCursorByName;
req->source = (CARD32) source;
req->nbytes = nbytes;
@@ -259,7 +259,7 @@ XFixesHideCursor (Display *dpy, Window win)
return;
LockDisplay (dpy);
GetReq (XFixesHideCursor, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesHideCursor;
req->window = (CARD32) win;
UnlockDisplay (dpy);
@@ -277,7 +277,7 @@ XFixesShowCursor (Display *dpy, Window win)
return;
LockDisplay (dpy);
GetReq (XFixesShowCursor, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesShowCursor;
req->window = (CARD32) win;
UnlockDisplay (dpy);
@@ -303,17 +303,17 @@ XFixesCreatePointerBarrier(Display *dpy, Window w, int x1, int y1,
LockDisplay (dpy);
GetReqExtra (XFixesCreatePointerBarrier, extra, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesCreatePointerBarrier;
barrier = XAllocID (dpy);
req->barrier = (CARD32) barrier;
req->window = (CARD32) w;
- req->x1 = x1;
- req->y1 = y1;
- req->x2 = x2;
- req->y2 = y2;
+ req->x1 = (INT16) x1;
+ req->y1 = (INT16) y1;
+ req->x2 = (INT16) x2;
+ req->y2 = (INT16) y2;
req->directions = directions;
- if ((req->num_devices = num_devices)) {
+ if ((req->num_devices = (CARD16) num_devices)) {
int i;
CARD16 *devs = (CARD16 *)(req + 1);
for (i = 0; i < num_devices; i++)
@@ -337,7 +337,7 @@ XFixesDestroyPointerBarrier(Display *dpy, PointerBarrier b)
LockDisplay (dpy);
GetReq (XFixesDestroyPointerBarrier, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesDestroyPointerBarrier;
req->barrier = (CARD32) b;
UnlockDisplay (dpy);
diff --git a/src/Disconnect.c b/src/Disconnect.c
index 047cd69..69341d7 100644
--- a/src/Disconnect.c
+++ b/src/Disconnect.c
@@ -61,7 +61,7 @@ XFixesSetClientDisconnectMode(Display *dpy, int disconnect_mode)
LockDisplay(dpy);
GetReq(XFixesSetClientDisconnectMode, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSetClientDisconnectMode;
req->disconnect_mode = disconnect_mode;
UnlockDisplay(dpy);
@@ -82,7 +82,7 @@ XFixesGetClientDisconnectMode(Display *dpy)
LockDisplay(dpy);
GetReq(XFixesGetClientDisconnectMode, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesGetClientDisconnectMode;
if (!_XReply(dpy, (xReply *) &rep, 0, xFalse))
diff --git a/src/Region.c b/src/Region.c
index d29297f..dcaaea7 100644
--- a/src/Region.c
+++ b/src/Region.c
@@ -37,7 +37,7 @@ XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles)
XFixesCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (XFixesCreateRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesCreateRegion;
region = XAllocID (dpy);
req->region = (CARD32) region;
@@ -60,7 +60,7 @@ XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap)
XFixesCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (XFixesCreateRegionFromBitmap, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesCreateRegionFromBitmap;
region = XAllocID (dpy);
req->region = (CARD32) region;
@@ -80,12 +80,12 @@ XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind)
XFixesCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (XFixesCreateRegionFromWindow, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesCreateRegionFromWindow;
region = XAllocID (dpy);
req->region = (CARD32) region;
req->window = (CARD32) window;
- req->kind = kind;
+ req->kind = (CARD8) kind;
UnlockDisplay (dpy);
SyncHandle();
return region;
@@ -101,7 +101,7 @@ XFixesCreateRegionFromGC (Display *dpy, GC gc)
XFixesCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (XFixesCreateRegionFromGC, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesCreateRegionFromGC;
region = XAllocID (dpy);
req->region = (CARD32) region;
@@ -121,7 +121,7 @@ XFixesCreateRegionFromPicture (Display *dpy, XID picture)
XFixesCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (XFixesCreateRegionFromPicture, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesCreateRegionFromPicture;
region = XAllocID (dpy);
req->region = (CARD32) region;
@@ -140,7 +140,7 @@ XFixesDestroyRegion (Display *dpy, XserverRegion region)
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesDestroyRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesDestroyRegion;
req->region = (CARD32) region;
UnlockDisplay (dpy);
@@ -158,7 +158,7 @@ XFixesSetRegion (Display *dpy, XserverRegion region,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesSetRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSetRegion;
req->region = (CARD32) region;
len = ((long) nrectangles) << 1;
@@ -178,7 +178,7 @@ XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src)
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesCopyRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesCopyRegion;
req->source = (CARD32) src;
req->destination = (CARD32) dst;
@@ -196,7 +196,7 @@ XFixesUnionRegion (Display *dpy, XserverRegion dst,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesUnionRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesUnionRegion;
req->source1 = (CARD32) src1;
req->source2 = (CARD32) src2;
@@ -215,7 +215,7 @@ XFixesIntersectRegion (Display *dpy, XserverRegion dst,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesIntersectRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesIntersectRegion;
req->source1 = (CARD32) src1;
req->source2 = (CARD32) src2;
@@ -234,7 +234,7 @@ XFixesSubtractRegion (Display *dpy, XserverRegion dst,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesSubtractRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSubtractRegion;
req->source1 = (CARD32) src1;
req->source2 = (CARD32) src2;
@@ -253,7 +253,7 @@ XFixesInvertRegion (Display *dpy, XserverRegion dst,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesInvertRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesInvertRegion;
req->x = rect->x;
req->y = rect->y;
@@ -274,11 +274,11 @@ XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy)
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesTranslateRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesTranslateRegion;
req->region = (CARD32) region;
- req->dx = dx;
- req->dy = dy;
+ req->dx = (INT16) dx;
+ req->dy = (INT16) dy;
UnlockDisplay (dpy);
SyncHandle();
}
@@ -292,7 +292,7 @@ XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src)
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesRegionExtents, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesRegionExtents;
req->source = (CARD32) src;
req->destination = (CARD32) dst;
@@ -325,7 +325,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
XFixesCheckExtension (dpy, info, NULL);
LockDisplay (dpy);
GetReq (XFixesFetchRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesFetchRegion;
req->region = (CARD32) region;
*nrectanglesRet = 0;
@@ -381,12 +381,12 @@ XFixesSetGCClipRegion (Display *dpy, GC gc,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesSetGCClipRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSetGCClipRegion;
req->gc = (CARD32) gc->gid;
req->region = (CARD32) region;
- req->xOrigin = clip_x_origin;
- req->yOrigin = clip_y_origin;
+ req->xOrigin = (INT16) clip_x_origin;
+ req->yOrigin = (INT16) clip_y_origin;
UnlockDisplay (dpy);
SyncHandle();
}
@@ -401,12 +401,12 @@ XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesSetWindowShapeRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSetWindowShapeRegion;
req->dest = (CARD32) win;
- req->destKind = shape_kind;
- req->xOff = x_off;
- req->yOff = y_off;
+ req->destKind = (BYTE) shape_kind;
+ req->xOff = (INT16) x_off;
+ req->yOff = (INT16) y_off;
req->region = (CARD32) region;
UnlockDisplay (dpy);
SyncHandle();
@@ -423,12 +423,12 @@ XFixesSetPictureClipRegion (Display *dpy, XID picture,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesSetPictureClipRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSetPictureClipRegion;
req->picture = (CARD32) picture;
req->region = (CARD32) region;
- req->xOrigin = clip_x_origin;
- req->yOrigin = clip_y_origin;
+ req->xOrigin = (INT16) clip_x_origin;
+ req->yOrigin = (INT16) clip_y_origin;
UnlockDisplay (dpy);
SyncHandle();
}
@@ -444,14 +444,14 @@ XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src,
XFixesSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (XFixesExpandRegion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesExpandRegion;
req->source = (CARD32) src;
req->destination = (CARD32) dst;
- req->left = left;
- req->right = right;
- req->top = top;
- req->bottom = bottom;
+ req->left = (CARD16) left;
+ req->right = (CARD16) right;
+ req->top = (CARD16) top;
+ req->bottom = (CARD16) bottom;
UnlockDisplay (dpy);
SyncHandle();
}
diff --git a/src/SaveSet.c b/src/SaveSet.c
index 74e4924..26115d7 100644
--- a/src/SaveSet.c
+++ b/src/SaveSet.c
@@ -36,11 +36,11 @@ XFixesChangeSaveSet (Display *dpy, Window win, int mode, int target, int map)
LockDisplay (dpy);
GetReq (XFixesChangeSaveSet, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesChangeSaveSet;
- req->mode = mode;
- req->target = target;
- req->map = map;
+ req->mode = (BYTE) mode;
+ req->target = (BYTE) target;
+ req->map = (BYTE) map;
req->window = (CARD32) win;
UnlockDisplay (dpy);
SyncHandle ();
diff --git a/src/Selection.c b/src/Selection.c
index 357870b..996460c 100644
--- a/src/Selection.c
+++ b/src/Selection.c
@@ -39,7 +39,7 @@ XFixesSelectSelectionInput (Display *dpy,
LockDisplay (dpy);
GetReq (XFixesSelectSelectionInput, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSelectSelectionInput;
req->window = (CARD32) win;
req->selection = (CARD32) selection;
diff --git a/src/Xfixes.c b/src/Xfixes.c
index 4e5c247..74d237d 100644
--- a/src/Xfixes.c
+++ b/src/Xfixes.c
@@ -76,7 +76,7 @@ XFixesExtAddDisplay (XFixesExtInfo *extinfo,
*/
LockDisplay (dpy);
GetReq (XFixesQueryVersion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesQueryVersion;
req->majorVersion = XFIXES_MAJOR;
req->minorVersion = XFIXES_MINOR;
@@ -270,8 +270,8 @@ XFixesEventToWire(Display *dpy, XEvent *event, xEvent *wire)
xXFixesSelectionNotifyEvent *awire;
awire = (xXFixesSelectionNotifyEvent *) wire;
aevent = (XFixesSelectionNotifyEvent *) event;
- awire->type = aevent->type | (aevent->send_event ? 0x80 : 0);
- awire->subtype = aevent->subtype;
+ awire->type = (CARD8) (aevent->type | (aevent->send_event ? 0x80 : 0));
+ awire->subtype = (CARD8) aevent->subtype;
awire->window = (CARD32) aevent->window;
awire->owner = (CARD32) aevent->owner;
awire->selection = (CARD32) aevent->selection;
@@ -284,8 +284,8 @@ XFixesEventToWire(Display *dpy, XEvent *event, xEvent *wire)
xXFixesCursorNotifyEvent *awire;
awire = (xXFixesCursorNotifyEvent *) wire;
aevent = (XFixesCursorNotifyEvent *) event;
- awire->type = aevent->type | (aevent->send_event ? 0x80 : 0);
- awire->subtype = aevent->subtype;
+ awire->type = (CARD8) (aevent->type | (aevent->send_event ? 0x80 : 0));
+ awire->subtype = (CARD8) aevent->subtype;
awire->window = (CARD32) aevent->window;
awire->timestamp = (CARD32) aevent->timestamp;
awire->cursorSerial = (CARD32) aevent->cursor_serial;