xfixes: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping much easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
c2270f38b3
commit
9b8638da17
200
xfixes/cursor.c
200
xfixes/cursor.c
|
@ -47,6 +47,7 @@
|
||||||
#include "dix/cursor_priv.h"
|
#include "dix/cursor_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
#include "dix/request_priv.h"
|
||||||
#include "dix/screen_hooks_priv.h"
|
#include "dix/screen_hooks_priv.h"
|
||||||
|
|
||||||
#include "xfixesint.h"
|
#include "xfixesint.h"
|
||||||
|
@ -257,11 +258,13 @@ XFixesSelectCursorInput(ClientPtr pClient, WindowPtr pWindow, CARD32 eventMask)
|
||||||
int
|
int
|
||||||
ProcXFixesSelectCursorInput(ClientPtr client)
|
ProcXFixesSelectCursorInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesSelectCursorInputReq);
|
REQUEST_HEAD_STRUCT(xXFixesSelectCursorInputReq);
|
||||||
|
REQUEST_FIELD_CARD32(window);
|
||||||
|
REQUEST_FIELD_CARD32(eventMask);
|
||||||
|
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq);
|
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -288,16 +291,6 @@ GetBit(unsigned char *line, int x)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesSelectCursorInput(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesSelectCursorInputReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq);
|
|
||||||
swapl(&stuff->window);
|
|
||||||
swapl(&stuff->eventMask);
|
|
||||||
return ProcXFixesSelectCursorInput(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _X_COLD
|
void _X_COLD
|
||||||
SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from,
|
SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from,
|
||||||
xXFixesCursorNotifyEvent * to)
|
xXFixesCursorNotifyEvent * to)
|
||||||
|
@ -353,11 +346,11 @@ CopyCursorToImage(CursorPtr pCursor, CARD32 *image)
|
||||||
int
|
int
|
||||||
ProcXFixesGetCursorImage(ClientPtr client)
|
ProcXFixesGetCursorImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xXFixesGetCursorImageReq); */
|
REQUEST_HEAD_STRUCT(xXFixesGetCursorImageReq);
|
||||||
|
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
int npixels, width, height, rc, x, y;
|
int npixels, width, height, rc, x, y;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesGetCursorImageReq);
|
|
||||||
pCursor = CursorForClient(client);
|
pCursor = CursorForClient(client);
|
||||||
if (!pCursor)
|
if (!pCursor)
|
||||||
return BadCursor;
|
return BadCursor;
|
||||||
|
@ -403,23 +396,18 @@ ProcXFixesGetCursorImage(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesGetCursorImage(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesGetCursorImageReq);
|
|
||||||
return ProcXFixesGetCursorImage(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesSetCursorName(ClientPtr client)
|
ProcXFixesSetCursorName(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_AT_LEAST(xXFixesSetCursorNameReq);
|
||||||
|
REQUEST_FIELD_CARD32(cursor);
|
||||||
|
REQUEST_FIELD_CARD16(nbytes);
|
||||||
|
REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes);
|
||||||
|
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
char *tchar;
|
char *tchar;
|
||||||
|
|
||||||
REQUEST(xXFixesSetCursorNameReq);
|
|
||||||
Atom atom;
|
Atom atom;
|
||||||
|
|
||||||
REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes);
|
|
||||||
VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess);
|
VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess);
|
||||||
tchar = (char *) &stuff[1];
|
tchar = (char *) &stuff[1];
|
||||||
atom = MakeAtom(tchar, stuff->nbytes, TRUE);
|
atom = MakeAtom(tchar, stuff->nbytes, TRUE);
|
||||||
|
@ -430,26 +418,16 @@ ProcXFixesSetCursorName(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesSetCursorName(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesSetCursorNameReq);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
|
|
||||||
swapl(&stuff->cursor);
|
|
||||||
swaps(&stuff->nbytes);
|
|
||||||
return ProcXFixesSetCursorName(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesGetCursorName(ClientPtr client)
|
ProcXFixesGetCursorName(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesGetCursorNameReq);
|
REQUEST_HEAD_STRUCT(xXFixesGetCursorNameReq);
|
||||||
|
REQUEST_FIELD_CARD32(cursor);
|
||||||
|
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
const char *str;
|
const char *str;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
|
|
||||||
VERIFY_CURSOR(pCursor, stuff->cursor, client, DixGetAttrAccess);
|
VERIFY_CURSOR(pCursor, stuff->cursor, client, DixGetAttrAccess);
|
||||||
if (pCursor->name)
|
if (pCursor->name)
|
||||||
str = NameForAtom(pCursor->name);
|
str = NameForAtom(pCursor->name);
|
||||||
|
@ -476,19 +454,11 @@ ProcXFixesGetCursorName(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesGetCursorName(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesGetCursorNameReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
|
|
||||||
swapl(&stuff->cursor);
|
|
||||||
return ProcXFixesGetCursorName(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesGetCursorImageAndName(ClientPtr client)
|
ProcXFixesGetCursorImageAndName(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xXFixesGetCursorImageAndNameReq); */
|
REQUEST_HEAD_STRUCT(xXFixesGetCursorImageAndNameReq);
|
||||||
|
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
int npixels;
|
int npixels;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -496,7 +466,6 @@ ProcXFixesGetCursorImageAndName(ClientPtr client)
|
||||||
int width, height;
|
int width, height;
|
||||||
int rc, x, y;
|
int rc, x, y;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesGetCursorImageAndNameReq);
|
|
||||||
pCursor = CursorForClient(client);
|
pCursor = CursorForClient(client);
|
||||||
if (!pCursor)
|
if (!pCursor)
|
||||||
return BadCursor;
|
return BadCursor;
|
||||||
|
@ -552,13 +521,6 @@ ProcXFixesGetCursorImageAndName(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesGetCursorImageAndName(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesGetCursorImageAndNameReq);
|
|
||||||
return ProcXFixesGetCursorImageAndName(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find every cursor reference in the system, ask testCursor
|
* Find every cursor reference in the system, ask testCursor
|
||||||
* whether it should be replaced with a reference to pCursor.
|
* whether it should be replaced with a reference to pCursor.
|
||||||
|
@ -664,11 +626,12 @@ TestForCursor(CursorPtr pCursor, void *closure)
|
||||||
int
|
int
|
||||||
ProcXFixesChangeCursor(ClientPtr client)
|
ProcXFixesChangeCursor(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesChangeCursorReq);
|
||||||
|
REQUEST_FIELD_CARD32(source);
|
||||||
|
REQUEST_FIELD_CARD32(destination);
|
||||||
|
|
||||||
CursorPtr pSource, pDestination;
|
CursorPtr pSource, pDestination;
|
||||||
|
|
||||||
REQUEST(xXFixesChangeCursorReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesChangeCursorReq);
|
|
||||||
VERIFY_CURSOR(pSource, stuff->source, client,
|
VERIFY_CURSOR(pSource, stuff->source, client,
|
||||||
DixReadAccess | DixGetAttrAccess);
|
DixReadAccess | DixGetAttrAccess);
|
||||||
VERIFY_CURSOR(pDestination, stuff->destination, client,
|
VERIFY_CURSOR(pDestination, stuff->destination, client,
|
||||||
|
@ -678,16 +641,6 @@ ProcXFixesChangeCursor(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesChangeCursor(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesChangeCursorReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesChangeCursorReq);
|
|
||||||
swapl(&stuff->source);
|
|
||||||
swapl(&stuff->destination);
|
|
||||||
return ProcXFixesChangeCursor(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
TestForCursorName(CursorPtr pCursor, void *closure)
|
TestForCursorName(CursorPtr pCursor, void *closure)
|
||||||
{
|
{
|
||||||
|
@ -699,13 +652,15 @@ TestForCursorName(CursorPtr pCursor, void *closure)
|
||||||
int
|
int
|
||||||
ProcXFixesChangeCursorByName(ClientPtr client)
|
ProcXFixesChangeCursorByName(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_AT_LEAST(xXFixesChangeCursorByNameReq);
|
||||||
|
REQUEST_FIELD_CARD32(source);
|
||||||
|
REQUEST_FIELD_CARD16(nbytes);
|
||||||
|
REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes);
|
||||||
|
|
||||||
CursorPtr pSource;
|
CursorPtr pSource;
|
||||||
Atom name;
|
Atom name;
|
||||||
char *tchar;
|
char *tchar;
|
||||||
|
|
||||||
REQUEST(xXFixesChangeCursorByNameReq);
|
|
||||||
|
|
||||||
REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes);
|
|
||||||
VERIFY_CURSOR(pSource, stuff->source, client,
|
VERIFY_CURSOR(pSource, stuff->source, client,
|
||||||
DixReadAccess | DixGetAttrAccess);
|
DixReadAccess | DixGetAttrAccess);
|
||||||
tchar = (char *) &stuff[1];
|
tchar = (char *) &stuff[1];
|
||||||
|
@ -715,16 +670,6 @@ ProcXFixesChangeCursorByName(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesChangeCursorByName(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesChangeCursorByNameReq);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesChangeCursorByNameReq);
|
|
||||||
swapl(&stuff->source);
|
|
||||||
swaps(&stuff->nbytes);
|
|
||||||
return ProcXFixesChangeCursorByName(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routines for manipulating the per-screen hide counts list.
|
* Routines for manipulating the per-screen hide counts list.
|
||||||
* This list indicates which clients have requested cursor hiding
|
* This list indicates which clients have requested cursor hiding
|
||||||
|
@ -821,14 +766,13 @@ deleteCursorHideCountsForScreen(ScreenPtr pScreen)
|
||||||
int
|
int
|
||||||
ProcXFixesHideCursor(ClientPtr client)
|
ProcXFixesHideCursor(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesHideCursorReq);
|
||||||
|
REQUEST_FIELD_CARD32(window);
|
||||||
|
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CursorHideCountPtr pChc;
|
CursorHideCountPtr pChc;
|
||||||
|
|
||||||
REQUEST(xXFixesHideCursorReq);
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesHideCursorReq);
|
|
||||||
|
|
||||||
ret = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
|
ret = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
|
||||||
client, DixGetAttrAccess);
|
client, DixGetAttrAccess);
|
||||||
if (ret != Success) {
|
if (ret != Success) {
|
||||||
|
@ -870,26 +814,16 @@ ProcXFixesHideCursor(ClientPtr client)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesHideCursor(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesHideCursorReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesHideCursorReq);
|
|
||||||
swapl(&stuff->window);
|
|
||||||
return ProcXFixesHideCursor(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesShowCursor(ClientPtr client)
|
ProcXFixesShowCursor(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesShowCursorReq);
|
||||||
|
REQUEST_FIELD_CARD32(window);
|
||||||
|
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CursorHideCountPtr pChc;
|
CursorHideCountPtr pChc;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xXFixesShowCursorReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesShowCursorReq);
|
|
||||||
|
|
||||||
rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
|
rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
|
||||||
client, DixGetAttrAccess);
|
client, DixGetAttrAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success) {
|
||||||
|
@ -918,15 +852,6 @@ ProcXFixesShowCursor(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesShowCursor(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesShowCursorReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesShowCursorReq);
|
|
||||||
swapl(&stuff->window);
|
|
||||||
return ProcXFixesShowCursor(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
CursorFreeClient(void *data, XID id)
|
CursorFreeClient(void *data, XID id)
|
||||||
{
|
{
|
||||||
|
@ -977,61 +902,40 @@ CursorFreeWindow(void *data, XID id)
|
||||||
int
|
int
|
||||||
ProcXFixesCreatePointerBarrier(ClientPtr client)
|
ProcXFixesCreatePointerBarrier(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesCreatePointerBarrierReq);
|
REQUEST_HEAD_AT_LEAST(xXFixesCreatePointerBarrierReq);
|
||||||
|
REQUEST_FIELD_CARD16(num_devices);
|
||||||
REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
|
REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
|
||||||
pad_to_int32(stuff->num_devices * sizeof(CARD16)));
|
pad_to_int32(stuff->num_devices * sizeof(CARD16)));
|
||||||
|
|
||||||
|
REQUEST_FIELD_CARD32(barrier);
|
||||||
|
REQUEST_FIELD_CARD32(window);
|
||||||
|
REQUEST_FIELD_CARD16(x1);
|
||||||
|
REQUEST_FIELD_CARD16(y1);
|
||||||
|
REQUEST_FIELD_CARD16(x2);
|
||||||
|
REQUEST_FIELD_CARD16(y2);
|
||||||
|
REQUEST_FIELD_CARD32(directions);
|
||||||
|
|
||||||
|
// FIXME
|
||||||
|
if (client->swapped) {
|
||||||
|
CARD16 *in_devices = (CARD16 *) &stuff[1];
|
||||||
|
for (int i = 0; i < stuff->num_devices; i++) {
|
||||||
|
swaps(in_devices + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->barrier, client);
|
LEGAL_NEW_RESOURCE(stuff->barrier, client);
|
||||||
|
|
||||||
return XICreatePointerBarrier(client, stuff);
|
return XICreatePointerBarrier(client, stuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCreatePointerBarrier(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCreatePointerBarrierReq);
|
|
||||||
int i;
|
|
||||||
CARD16 *in_devices = (CARD16 *) &stuff[1];
|
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesCreatePointerBarrierReq);
|
|
||||||
|
|
||||||
swaps(&stuff->num_devices);
|
|
||||||
REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
|
|
||||||
pad_to_int32(stuff->num_devices * sizeof(CARD16)));
|
|
||||||
|
|
||||||
swapl(&stuff->barrier);
|
|
||||||
swapl(&stuff->window);
|
|
||||||
swaps(&stuff->x1);
|
|
||||||
swaps(&stuff->y1);
|
|
||||||
swaps(&stuff->x2);
|
|
||||||
swaps(&stuff->y2);
|
|
||||||
swapl(&stuff->directions);
|
|
||||||
for (i = 0; i < stuff->num_devices; i++) {
|
|
||||||
swaps(in_devices + i);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ProcXFixesCreatePointerBarrier(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesDestroyPointerBarrier(ClientPtr client)
|
ProcXFixesDestroyPointerBarrier(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesDestroyPointerBarrierReq);
|
REQUEST_HEAD_STRUCT(xXFixesDestroyPointerBarrierReq);
|
||||||
|
REQUEST_FIELD_CARD32(barrier);
|
||||||
REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
|
|
||||||
|
|
||||||
return XIDestroyPointerBarrier(client, stuff);
|
return XIDestroyPointerBarrier(client, stuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesDestroyPointerBarrier(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesDestroyPointerBarrierReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
|
|
||||||
swapl(&stuff->barrier);
|
|
||||||
return ProcXFixesDestroyPointerBarrier(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
XFixesCursorInit(void)
|
XFixesCursorInit(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/request_priv.h"
|
||||||
|
|
||||||
#include "xfixesint.h"
|
#include "xfixesint.h"
|
||||||
|
|
||||||
|
@ -63,32 +64,21 @@ typedef struct _ClientDisconnect {
|
||||||
int
|
int
|
||||||
ProcXFixesSetClientDisconnectMode(ClientPtr client)
|
ProcXFixesSetClientDisconnectMode(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesSetClientDisconnectModeReq);
|
||||||
|
REQUEST_FIELD_CARD32(disconnect_mode);
|
||||||
|
|
||||||
ClientDisconnectPtr pDisconnect = GetClientDisconnect(client);
|
ClientDisconnectPtr pDisconnect = GetClientDisconnect(client);
|
||||||
|
|
||||||
REQUEST(xXFixesSetClientDisconnectModeReq);
|
|
||||||
|
|
||||||
pDisconnect->disconnect_mode = stuff->disconnect_mode;
|
pDisconnect->disconnect_mode = stuff->disconnect_mode;
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesSetClientDisconnectMode(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesSetClientDisconnectModeReq);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesSetClientDisconnectModeReq);
|
|
||||||
|
|
||||||
swapl(&stuff->disconnect_mode);
|
|
||||||
|
|
||||||
return ProcXFixesSetClientDisconnectMode(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesGetClientDisconnectMode(ClientPtr client)
|
ProcXFixesGetClientDisconnectMode(ClientPtr client)
|
||||||
{
|
{
|
||||||
ClientDisconnectPtr pDisconnect = GetClientDisconnect(client);
|
REQUEST_HEAD_STRUCT(xXFixesGetClientDisconnectModeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq);
|
ClientDisconnectPtr pDisconnect = GetClientDisconnect(client);
|
||||||
|
|
||||||
xXFixesGetClientDisconnectModeReply rep = {
|
xXFixesGetClientDisconnectModeReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
|
@ -105,15 +95,6 @@ ProcXFixesGetClientDisconnectMode(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesGetClientDisconnectMode(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesGetClientDisconnectModeReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq);
|
|
||||||
|
|
||||||
return ProcXFixesGetClientDisconnectMode(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
XFixesShouldDisconnectClient(ClientPtr client)
|
XFixesShouldDisconnectClient(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
|
317
xfixes/region.c
317
xfixes/region.c
|
@ -23,6 +23,7 @@
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/request_priv.h"
|
||||||
#include "render/picturestr_priv.h"
|
#include "render/picturestr_priv.h"
|
||||||
#include "Xext/panoramiX.h"
|
#include "Xext/panoramiX.h"
|
||||||
#include "Xext/panoramiXsrv.h"
|
#include "Xext/panoramiXsrv.h"
|
||||||
|
@ -71,12 +72,13 @@ XFixesRegionInit(void)
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegion(ClientPtr client)
|
ProcXFixesCreateRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_AT_LEAST(xXFixesCreateRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_REST_CARD16();
|
||||||
|
|
||||||
int things;
|
int things;
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
|
|
||||||
REQUEST(xXFixesCreateRegionReq);
|
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesCreateRegionReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->region, client);
|
LEGAL_NEW_RESOURCE(stuff->region, client);
|
||||||
|
|
||||||
things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq);
|
things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq);
|
||||||
|
@ -93,26 +95,17 @@ ProcXFixesCreateRegion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCreateRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCreateRegionReq);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesCreateRegionReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
SwapRestS(stuff);
|
|
||||||
return ProcXFixesCreateRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromBitmap(ClientPtr client)
|
ProcXFixesCreateRegionFromBitmap(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromBitmapReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_FIELD_CARD32(bitmap);
|
||||||
|
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xXFixesCreateRegionFromBitmapReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->region, client);
|
LEGAL_NEW_RESOURCE(stuff->region, client);
|
||||||
|
|
||||||
rc = dixLookupResourceByType((void **) &pPixmap, stuff->bitmap, X11_RESTYPE_PIXMAP,
|
rc = dixLookupResourceByType((void **) &pPixmap, stuff->bitmap, X11_RESTYPE_PIXMAP,
|
||||||
|
@ -135,27 +128,18 @@ ProcXFixesCreateRegionFromBitmap(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCreateRegionFromBitmap(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCreateRegionFromBitmapReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
swapl(&stuff->bitmap);
|
|
||||||
return ProcXFixesCreateRegionFromBitmap(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromWindow(ClientPtr client)
|
ProcXFixesCreateRegionFromWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromWindowReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_FIELD_CARD32(window);
|
||||||
|
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
Bool copy = TRUE;
|
Bool copy = TRUE;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xXFixesCreateRegionFromWindowReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->region, client);
|
LEGAL_NEW_RESOURCE(stuff->region, client);
|
||||||
rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
|
rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
|
||||||
client, DixGetAttrAccess);
|
client, DixGetAttrAccess);
|
||||||
|
@ -192,26 +176,17 @@ ProcXFixesCreateRegionFromWindow(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCreateRegionFromWindow(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCreateRegionFromWindowReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
swapl(&stuff->window);
|
|
||||||
return ProcXFixesCreateRegionFromWindow(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromGC(ClientPtr client)
|
ProcXFixesCreateRegionFromGC(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromGCReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_FIELD_CARD32(gc);
|
||||||
|
|
||||||
RegionPtr pRegion, pClip;
|
RegionPtr pRegion, pClip;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xXFixesCreateRegionFromGCReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->region, client);
|
LEGAL_NEW_RESOURCE(stuff->region, client);
|
||||||
|
|
||||||
rc = dixLookupGC(&pGC, stuff->gc, client, DixGetAttrAccess);
|
rc = dixLookupGC(&pGC, stuff->gc, client, DixGetAttrAccess);
|
||||||
|
@ -233,25 +208,16 @@ ProcXFixesCreateRegionFromGC(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCreateRegionFromGC(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCreateRegionFromGCReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
swapl(&stuff->gc);
|
|
||||||
return ProcXFixesCreateRegionFromGC(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromPicture(ClientPtr client)
|
ProcXFixesCreateRegionFromPicture(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesCreateRegionFromPictureReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_FIELD_CARD32(picture);
|
||||||
|
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
PicturePtr pPicture;
|
PicturePtr pPicture;
|
||||||
|
|
||||||
REQUEST(xXFixesCreateRegionFromPictureReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromPictureReq);
|
|
||||||
LEGAL_NEW_RESOURCE(stuff->region, client);
|
LEGAL_NEW_RESOURCE(stuff->region, client);
|
||||||
|
|
||||||
VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess);
|
VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess);
|
||||||
|
@ -273,46 +239,29 @@ ProcXFixesCreateRegionFromPicture(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCreateRegionFromPicture(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCreateRegionFromPictureReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromPictureReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
swapl(&stuff->picture);
|
|
||||||
return ProcXFixesCreateRegionFromPicture(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesDestroyRegion(ClientPtr client)
|
ProcXFixesDestroyRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesDestroyRegionReq);
|
REQUEST_HEAD_STRUCT(xXFixesDestroyRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq);
|
|
||||||
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
|
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
|
||||||
FreeResource(stuff->region, X11_RESTYPE_NONE);
|
FreeResource(stuff->region, X11_RESTYPE_NONE);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesDestroyRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesDestroyRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
return ProcXFixesDestroyRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesSetRegion(ClientPtr client)
|
ProcXFixesSetRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_AT_LEAST(xXFixesSetRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_REST_CARD16();
|
||||||
|
|
||||||
int things;
|
int things;
|
||||||
RegionPtr pRegion, pNew;
|
RegionPtr pRegion, pNew;
|
||||||
|
|
||||||
REQUEST(xXFixesSetRegionReq);
|
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq);
|
|
||||||
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
|
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
|
||||||
|
|
||||||
things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq);
|
things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq);
|
||||||
|
@ -331,23 +280,14 @@ ProcXFixesSetRegion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesSetRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesSetRegionReq);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
SwapRestS(stuff);
|
|
||||||
return ProcXFixesSetRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCopyRegion(ClientPtr client)
|
ProcXFixesCopyRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
RegionPtr pSource, pDestination;
|
REQUEST_HEAD_STRUCT(xXFixesCopyRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(source);
|
||||||
|
REQUEST_FIELD_CARD32(destination);
|
||||||
|
|
||||||
REQUEST(xXFixesCopyRegionReq);
|
RegionPtr pSource, pDestination;
|
||||||
REQUEST_SIZE_MATCH(xXFixesCopyRegionReq);
|
|
||||||
|
|
||||||
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
||||||
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
||||||
|
@ -358,24 +298,16 @@ ProcXFixesCopyRegion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCopyRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCopyRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCopyRegionReq);
|
|
||||||
swapl(&stuff->source);
|
|
||||||
swapl(&stuff->destination);
|
|
||||||
return ProcXFixesCopyRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCombineRegion(ClientPtr client)
|
ProcXFixesCombineRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesCombineRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(source1);
|
||||||
|
REQUEST_FIELD_CARD32(source2);
|
||||||
|
REQUEST_FIELD_CARD32(destination);
|
||||||
|
|
||||||
RegionPtr pSource1, pSource2, pDestination;
|
RegionPtr pSource1, pSource2, pDestination;
|
||||||
|
|
||||||
REQUEST(xXFixesCombineRegionReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCombineRegionReq);
|
|
||||||
VERIFY_REGION(pSource1, stuff->source1, client, DixReadAccess);
|
VERIFY_REGION(pSource1, stuff->source1, client, DixReadAccess);
|
||||||
VERIFY_REGION(pSource2, stuff->source2, client, DixReadAccess);
|
VERIFY_REGION(pSource2, stuff->source2, client, DixReadAccess);
|
||||||
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
||||||
|
@ -398,26 +330,20 @@ ProcXFixesCombineRegion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesCombineRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesCombineRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesCombineRegionReq);
|
|
||||||
swapl(&stuff->source1);
|
|
||||||
swapl(&stuff->source2);
|
|
||||||
swapl(&stuff->destination);
|
|
||||||
return ProcXFixesCombineRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesInvertRegion(ClientPtr client)
|
ProcXFixesInvertRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesInvertRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(source);
|
||||||
|
REQUEST_FIELD_CARD16(x);
|
||||||
|
REQUEST_FIELD_CARD16(y);
|
||||||
|
REQUEST_FIELD_CARD16(width);
|
||||||
|
REQUEST_FIELD_CARD16(height);
|
||||||
|
REQUEST_FIELD_CARD32(destination);
|
||||||
|
|
||||||
RegionPtr pSource, pDestination;
|
RegionPtr pSource, pDestination;
|
||||||
BoxRec bounds;
|
BoxRec bounds;
|
||||||
|
|
||||||
REQUEST(xXFixesInvertRegionReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesInvertRegionReq);
|
|
||||||
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
||||||
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
||||||
|
|
||||||
|
@ -440,53 +366,32 @@ ProcXFixesInvertRegion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesInvertRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesInvertRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesInvertRegionReq);
|
|
||||||
swapl(&stuff->source);
|
|
||||||
swaps(&stuff->x);
|
|
||||||
swaps(&stuff->y);
|
|
||||||
swaps(&stuff->width);
|
|
||||||
swaps(&stuff->height);
|
|
||||||
swapl(&stuff->destination);
|
|
||||||
return ProcXFixesInvertRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesTranslateRegion(ClientPtr client)
|
ProcXFixesTranslateRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesTranslateRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_FIELD_CARD16(dx);
|
||||||
|
REQUEST_FIELD_CARD16(dy);
|
||||||
|
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
|
|
||||||
REQUEST(xXFixesTranslateRegionReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq);
|
|
||||||
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
|
VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
|
||||||
|
|
||||||
RegionTranslate(pRegion, stuff->dx, stuff->dy);
|
RegionTranslate(pRegion, stuff->dx, stuff->dy);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesTranslateRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesTranslateRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
swaps(&stuff->dx);
|
|
||||||
swaps(&stuff->dy);
|
|
||||||
return ProcXFixesTranslateRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesRegionExtents(ClientPtr client)
|
ProcXFixesRegionExtents(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesRegionExtentsReq);
|
||||||
|
|
||||||
|
REQUEST_FIELD_CARD32(source);
|
||||||
|
REQUEST_FIELD_CARD32(destination);
|
||||||
|
|
||||||
RegionPtr pSource, pDestination;
|
RegionPtr pSource, pDestination;
|
||||||
|
|
||||||
REQUEST(xXFixesRegionExtentsReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq);
|
|
||||||
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
||||||
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
||||||
|
|
||||||
|
@ -495,27 +400,17 @@ ProcXFixesRegionExtents(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesRegionExtents(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesRegionExtentsReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq);
|
|
||||||
swapl(&stuff->source);
|
|
||||||
swapl(&stuff->destination);
|
|
||||||
return ProcXFixesRegionExtents(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesFetchRegion(ClientPtr client)
|
ProcXFixesFetchRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesFetchRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
BoxPtr pExtent;
|
BoxPtr pExtent;
|
||||||
BoxPtr pBox;
|
BoxPtr pBox;
|
||||||
int i, nBox;
|
int i, nBox;
|
||||||
|
|
||||||
REQUEST(xXFixesFetchRegionReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesFetchRegionReq);
|
|
||||||
VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess);
|
VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess);
|
||||||
|
|
||||||
pExtent = RegionExtents(pRegion);
|
pExtent = RegionExtents(pRegion);
|
||||||
|
@ -555,15 +450,6 @@ ProcXFixesFetchRegion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesFetchRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesFetchRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesFetchRegionReq);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
return ProcXFixesFetchRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXFixesSetGCClipRegion(ClientPtr client, xXFixesSetGCClipRegionReq *stuff);
|
PanoramiXFixesSetGCClipRegion(ClientPtr client, xXFixesSetGCClipRegionReq *stuff);
|
||||||
|
|
||||||
|
@ -573,10 +459,13 @@ SingleXFixesSetGCClipRegion(ClientPtr client, xXFixesSetGCClipRegionReq *stuff);
|
||||||
int
|
int
|
||||||
ProcXFixesSetGCClipRegion(ClientPtr client)
|
ProcXFixesSetGCClipRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesSetGCClipRegionReq);
|
REQUEST_HEAD_STRUCT(xXFixesSetGCClipRegionReq);
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
|
REQUEST_FIELD_CARD32(gc);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_FIELD_CARD16(xOrigin);
|
||||||
|
REQUEST_FIELD_CARD16(yOrigin);
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
if (XFixesUseXinerama)
|
if (XFixesUseXinerama)
|
||||||
return PanoramiXFixesSetGCClipRegion(client, stuff);
|
return PanoramiXFixesSetGCClipRegion(client, stuff);
|
||||||
#endif
|
#endif
|
||||||
|
@ -612,18 +501,6 @@ SingleXFixesSetGCClipRegion(ClientPtr client, xXFixesSetGCClipRegionReq *stuff)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesSetGCClipRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesSetGCClipRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
|
|
||||||
swapl(&stuff->gc);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
swaps(&stuff->xOrigin);
|
|
||||||
swaps(&stuff->yOrigin);
|
|
||||||
return ProcXFixesSetGCClipRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef RegionPtr (*CreateDftPtr) (WindowPtr pWin);
|
typedef RegionPtr (*CreateDftPtr) (WindowPtr pWin);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -703,28 +580,19 @@ PanoramiXFixesSetWindowShapeRegion(ClientPtr client, xXFixesSetWindowShapeRegion
|
||||||
int
|
int
|
||||||
ProcXFixesSetWindowShapeRegion(ClientPtr client)
|
ProcXFixesSetWindowShapeRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesSetWindowShapeRegionReq);
|
REQUEST_HEAD_STRUCT(xXFixesSetWindowShapeRegionReq);
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
|
REQUEST_FIELD_CARD32(dest);
|
||||||
|
REQUEST_FIELD_CARD16(xOff);
|
||||||
|
REQUEST_FIELD_CARD16(yOff);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
if (XFixesUseXinerama)
|
if (XFixesUseXinerama)
|
||||||
return PanoramiXFixesSetWindowShapeRegion(client, stuff);
|
return PanoramiXFixesSetWindowShapeRegion(client, stuff);
|
||||||
#endif
|
#endif
|
||||||
return SingleXFixesSetWindowShapeRegion(client, stuff);
|
return SingleXFixesSetWindowShapeRegion(client, stuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesSetWindowShapeRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesSetWindowShapeRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
|
|
||||||
swapl(&stuff->dest);
|
|
||||||
swaps(&stuff->xOff);
|
|
||||||
swaps(&stuff->yOff);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
return ProcXFixesSetWindowShapeRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SingleXFixesSetPictureClipRegion(ClientPtr client, xXFixesSetPictureClipRegionReq *stuff);
|
SingleXFixesSetPictureClipRegion(ClientPtr client, xXFixesSetPictureClipRegionReq *stuff);
|
||||||
|
|
||||||
|
@ -734,10 +602,13 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client, xXFixesSetPictureClipRegion
|
||||||
int
|
int
|
||||||
ProcXFixesSetPictureClipRegion(ClientPtr client)
|
ProcXFixesSetPictureClipRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesSetPictureClipRegionReq);
|
REQUEST_HEAD_STRUCT(xXFixesSetPictureClipRegionReq);
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
|
REQUEST_FIELD_CARD32(picture);
|
||||||
|
REQUEST_FIELD_CARD32(region);
|
||||||
|
REQUEST_FIELD_CARD16(xOrigin);
|
||||||
|
REQUEST_FIELD_CARD16(yOrigin);
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef XINERAMA
|
||||||
if (XFixesUseXinerama)
|
if (XFixesUseXinerama)
|
||||||
return PanoramiXFixesSetPictureClipRegion(client, stuff);
|
return PanoramiXFixesSetPictureClipRegion(client, stuff);
|
||||||
#endif
|
#endif
|
||||||
|
@ -760,30 +631,24 @@ SingleXFixesSetPictureClipRegion(ClientPtr client, xXFixesSetPictureClipRegionRe
|
||||||
pRegion);
|
pRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesSetPictureClipRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesSetPictureClipRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
|
|
||||||
swapl(&stuff->picture);
|
|
||||||
swapl(&stuff->region);
|
|
||||||
swaps(&stuff->xOrigin);
|
|
||||||
swaps(&stuff->yOrigin);
|
|
||||||
return ProcXFixesSetPictureClipRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesExpandRegion(ClientPtr client)
|
ProcXFixesExpandRegion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesExpandRegionReq);
|
||||||
|
REQUEST_FIELD_CARD32(source);
|
||||||
|
REQUEST_FIELD_CARD32(destination);
|
||||||
|
REQUEST_FIELD_CARD16(left);
|
||||||
|
REQUEST_FIELD_CARD16(right);
|
||||||
|
REQUEST_FIELD_CARD16(top);
|
||||||
|
REQUEST_FIELD_CARD16(bottom);
|
||||||
|
|
||||||
RegionPtr pSource, pDestination;
|
RegionPtr pSource, pDestination;
|
||||||
|
|
||||||
REQUEST(xXFixesExpandRegionReq);
|
|
||||||
BoxPtr pTmp;
|
BoxPtr pTmp;
|
||||||
BoxPtr pSrc;
|
BoxPtr pSrc;
|
||||||
int nBoxes;
|
int nBoxes;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesExpandRegionReq);
|
|
||||||
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
|
||||||
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
|
||||||
|
|
||||||
|
@ -811,20 +676,6 @@ ProcXFixesExpandRegion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesExpandRegion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesExpandRegionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesExpandRegionReq);
|
|
||||||
swapl(&stuff->source);
|
|
||||||
swapl(&stuff->destination);
|
|
||||||
swaps(&stuff->left);
|
|
||||||
swaps(&stuff->right);
|
|
||||||
swaps(&stuff->top);
|
|
||||||
swaps(&stuff->bottom);
|
|
||||||
return ProcXFixesExpandRegion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/request_priv.h"
|
||||||
#include "dix/resource_priv.h"
|
#include "dix/resource_priv.h"
|
||||||
|
|
||||||
#include "xfixesint.h"
|
#include "xfixesint.h"
|
||||||
|
@ -30,13 +31,13 @@
|
||||||
int
|
int
|
||||||
ProcXFixesChangeSaveSet(ClientPtr client)
|
ProcXFixesChangeSaveSet(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesChangeSaveSetReq);
|
||||||
|
REQUEST_FIELD_CARD32(window);
|
||||||
|
|
||||||
Bool toRoot, map;
|
Bool toRoot, map;
|
||||||
int result;
|
int result;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
REQUEST(xXFixesChangeSaveSetReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
|
|
||||||
result = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
|
result = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
@ -58,13 +59,3 @@ ProcXFixesChangeSaveSet(ClientPtr client)
|
||||||
map = (stuff->map == SaveSetMap);
|
map = (stuff->map == SaveSetMap);
|
||||||
return AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map);
|
return AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXFixesChangeSaveSet(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesChangeSaveSetReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
|
|
||||||
|
|
||||||
swapl(&stuff->window);
|
|
||||||
return ProcXFixesChangeSaveSet(client);
|
|
||||||
}
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/request_priv.h"
|
||||||
|
|
||||||
#include "xfixesint.h"
|
#include "xfixesint.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
@ -189,15 +190,26 @@ ProcXFixesSelectSelectionInput(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
int
|
||||||
SProcXFixesSelectSelectionInput(ClientPtr client)
|
ProcXFixesSelectSelectionInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXFixesSelectSelectionInputReq);
|
REQUEST_HEAD_STRUCT(xXFixesSelectSelectionInputReq);
|
||||||
REQUEST_SIZE_MATCH(xXFixesSelectSelectionInputReq);
|
REQUEST_FIELD_CARD32(window);
|
||||||
swapl(&stuff->window);
|
REQUEST_FIELD_CARD32(selection);
|
||||||
swapl(&stuff->selection);
|
REQUEST_FIELD_CARD32(eventMask);
|
||||||
swapl(&stuff->eventMask);
|
|
||||||
return ProcXFixesSelectSelectionInput(client);
|
WindowPtr pWin;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
if (stuff->eventMask & ~SelectionAllEvents) {
|
||||||
|
client->errorValue = stuff->eventMask;
|
||||||
|
return BadValue;
|
||||||
|
}
|
||||||
|
return XFixesSelectSelectionInput(client, stuff->selection,
|
||||||
|
pWin, stuff->eventMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _X_COLD
|
void _X_COLD
|
||||||
|
|
117
xfixes/xfixes.c
117
xfixes/xfixes.c
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#include "dix/request_priv.h"
|
||||||
#include "os/fmt.h"
|
#include "os/fmt.h"
|
||||||
|
|
||||||
#include "xfixesint.h"
|
#include "xfixesint.h"
|
||||||
|
@ -63,6 +64,10 @@ static DevPrivateKeyRec XFixesClientPrivateKeyRec;
|
||||||
static int
|
static int
|
||||||
ProcXFixesQueryVersion(ClientPtr client)
|
ProcXFixesQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST_HEAD_STRUCT(xXFixesQueryVersionReq);
|
||||||
|
REQUEST_FIELD_CARD32(majorVersion);
|
||||||
|
REQUEST_FIELD_CARD32(minorVersion);
|
||||||
|
|
||||||
int major, minor;
|
int major, minor;
|
||||||
XFixesClientPtr pXFixesClient = GetXFixesClient(client);
|
XFixesClientPtr pXFixesClient = GetXFixesClient(client);
|
||||||
xXFixesQueryVersionReply rep = {
|
xXFixesQueryVersionReply rep = {
|
||||||
|
@ -71,10 +76,6 @@ ProcXFixesQueryVersion(ClientPtr client)
|
||||||
.length = 0
|
.length = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
REQUEST(xXFixesQueryVersionReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesQueryVersionReq);
|
|
||||||
|
|
||||||
if (version_compare(stuff->majorVersion, stuff->minorVersion,
|
if (version_compare(stuff->majorVersion, stuff->minorVersion,
|
||||||
SERVER_XFIXES_MAJOR_VERSION,
|
SERVER_XFIXES_MAJOR_VERSION,
|
||||||
SERVER_XFIXES_MINOR_VERSION) < 0) {
|
SERVER_XFIXES_MINOR_VERSION) < 0) {
|
||||||
|
@ -205,112 +206,6 @@ ProcXFixesDispatch(ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static _X_COLD int
|
|
||||||
SProcXFixesQueryVersion(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXFixesQueryVersionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesQueryVersionReq);
|
|
||||||
|
|
||||||
swapl(&stuff->majorVersion);
|
|
||||||
swapl(&stuff->minorVersion);
|
|
||||||
return ProcXFixesQueryVersion(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
static _X_COLD int
|
|
||||||
SProcXFixesDispatch(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xReq);
|
|
||||||
XFixesClientPtr pXFixesClient = GetXFixesClient(client);
|
|
||||||
|
|
||||||
if (pXFixesClient->major_version >= ARRAY_SIZE(version_requests))
|
|
||||||
return BadRequest;
|
|
||||||
if (stuff->data > version_requests[pXFixesClient->major_version])
|
|
||||||
return BadRequest;
|
|
||||||
|
|
||||||
switch (stuff->data) {
|
|
||||||
/*************** Version 1 ******************/
|
|
||||||
case X_XFixesQueryVersion:
|
|
||||||
return SProcXFixesQueryVersion(client);
|
|
||||||
case X_XFixesChangeSaveSet:
|
|
||||||
return SProcXFixesChangeSaveSet(client);
|
|
||||||
case X_XFixesSelectSelectionInput:
|
|
||||||
return SProcXFixesSelectSelectionInput(client);
|
|
||||||
case X_XFixesSelectCursorInput:
|
|
||||||
return SProcXFixesSelectCursorInput(client);
|
|
||||||
case X_XFixesGetCursorImage:
|
|
||||||
return SProcXFixesGetCursorImage(client);
|
|
||||||
|
|
||||||
/*************** Version 2 ******************/
|
|
||||||
case X_XFixesCreateRegion:
|
|
||||||
return SProcXFixesCreateRegion(client);
|
|
||||||
case X_XFixesCreateRegionFromBitmap:
|
|
||||||
return SProcXFixesCreateRegionFromBitmap(client);
|
|
||||||
case X_XFixesCreateRegionFromWindow:
|
|
||||||
return SProcXFixesCreateRegionFromWindow(client);
|
|
||||||
case X_XFixesCreateRegionFromGC:
|
|
||||||
return SProcXFixesCreateRegionFromGC(client);
|
|
||||||
case X_XFixesCreateRegionFromPicture:
|
|
||||||
return SProcXFixesCreateRegionFromPicture(client);
|
|
||||||
case X_XFixesDestroyRegion:
|
|
||||||
return SProcXFixesDestroyRegion(client);
|
|
||||||
case X_XFixesSetRegion:
|
|
||||||
return SProcXFixesSetRegion(client);
|
|
||||||
case X_XFixesCopyRegion:
|
|
||||||
return SProcXFixesCopyRegion(client);
|
|
||||||
case X_XFixesUnionRegion:
|
|
||||||
return SProcXFixesCombineRegion(client);
|
|
||||||
case X_XFixesIntersectRegion:
|
|
||||||
return SProcXFixesCombineRegion(client);
|
|
||||||
case X_XFixesSubtractRegion:
|
|
||||||
return SProcXFixesCombineRegion(client);
|
|
||||||
case X_XFixesInvertRegion:
|
|
||||||
return SProcXFixesInvertRegion(client);
|
|
||||||
case X_XFixesTranslateRegion:
|
|
||||||
return SProcXFixesTranslateRegion(client);
|
|
||||||
case X_XFixesRegionExtents:
|
|
||||||
return SProcXFixesRegionExtents(client);
|
|
||||||
case X_XFixesFetchRegion:
|
|
||||||
return SProcXFixesFetchRegion(client);
|
|
||||||
case X_XFixesSetGCClipRegion:
|
|
||||||
return SProcXFixesSetGCClipRegion(client);
|
|
||||||
case X_XFixesSetWindowShapeRegion:
|
|
||||||
return SProcXFixesSetWindowShapeRegion(client);
|
|
||||||
case X_XFixesSetPictureClipRegion:
|
|
||||||
return SProcXFixesSetPictureClipRegion(client);
|
|
||||||
case X_XFixesSetCursorName:
|
|
||||||
return SProcXFixesSetCursorName(client);
|
|
||||||
case X_XFixesGetCursorName:
|
|
||||||
return SProcXFixesGetCursorName(client);
|
|
||||||
case X_XFixesGetCursorImageAndName:
|
|
||||||
return SProcXFixesGetCursorImageAndName(client);
|
|
||||||
case X_XFixesChangeCursor:
|
|
||||||
return SProcXFixesChangeCursor(client);
|
|
||||||
case X_XFixesChangeCursorByName:
|
|
||||||
return SProcXFixesChangeCursorByName(client);
|
|
||||||
|
|
||||||
/*************** Version 3 ******************/
|
|
||||||
case X_XFixesExpandRegion:
|
|
||||||
return SProcXFixesExpandRegion(client);
|
|
||||||
/*************** Version 4 ******************/
|
|
||||||
case X_XFixesHideCursor:
|
|
||||||
return SProcXFixesHideCursor(client);
|
|
||||||
case X_XFixesShowCursor:
|
|
||||||
return SProcXFixesShowCursor(client);
|
|
||||||
/*************** Version 5 ******************/
|
|
||||||
case X_XFixesCreatePointerBarrier:
|
|
||||||
return SProcXFixesCreatePointerBarrier(client);
|
|
||||||
case X_XFixesDestroyPointerBarrier:
|
|
||||||
return SProcXFixesDestroyPointerBarrier(client);
|
|
||||||
/*************** Version 6 ******************/
|
|
||||||
case X_XFixesSetClientDisconnectMode:
|
|
||||||
return SProcXFixesSetClientDisconnectMode(client);
|
|
||||||
case X_XFixesGetClientDisconnectMode:
|
|
||||||
return SProcXFixesGetClientDisconnectMode(client);
|
|
||||||
default:
|
|
||||||
return BadRequest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
XFixesExtensionInit(void)
|
XFixesExtensionInit(void)
|
||||||
{
|
{
|
||||||
|
@ -326,7 +221,7 @@ XFixesExtensionInit(void)
|
||||||
XFixesClientDisconnectInit() &&
|
XFixesClientDisconnectInit() &&
|
||||||
(extEntry = AddExtension(XFIXES_NAME, XFixesNumberEvents,
|
(extEntry = AddExtension(XFIXES_NAME, XFixesNumberEvents,
|
||||||
XFixesNumberErrors,
|
XFixesNumberErrors,
|
||||||
ProcXFixesDispatch, SProcXFixesDispatch,
|
ProcXFixesDispatch, ProcXFixesDispatch,
|
||||||
NULL, StandardMinorOpcode)) != 0) {
|
NULL, StandardMinorOpcode)) != 0) {
|
||||||
XFixesReqCode = (unsigned char) extEntry->base;
|
XFixesReqCode = (unsigned char) extEntry->base;
|
||||||
XFixesEventBase = extEntry->eventBase;
|
XFixesEventBase = extEntry->eventBase;
|
||||||
|
|
|
@ -73,16 +73,10 @@ typedef struct _XFixesClient {
|
||||||
int
|
int
|
||||||
ProcXFixesChangeSaveSet(ClientPtr client);
|
ProcXFixesChangeSaveSet(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesChangeSaveSet(ClientPtr client);
|
|
||||||
|
|
||||||
/* Selection events */
|
/* Selection events */
|
||||||
int
|
int
|
||||||
ProcXFixesSelectSelectionInput(ClientPtr client);
|
ProcXFixesSelectSelectionInput(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSelectSelectionInput(ClientPtr client);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
||||||
SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from,
|
SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from,
|
||||||
|
@ -97,54 +91,32 @@ Bool
|
||||||
int
|
int
|
||||||
ProcXFixesSelectCursorInput(ClientPtr client);
|
ProcXFixesSelectCursorInput(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSelectCursorInput(ClientPtr client);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
||||||
SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from,
|
SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from,
|
||||||
xXFixesCursorNotifyEvent * to);
|
xXFixesCursorNotifyEvent * to);
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesGetCursorImage(ClientPtr client);
|
ProcXFixesGetCursorImage(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesGetCursorImage(ClientPtr client);
|
|
||||||
|
|
||||||
/* Cursor names (Version 2) */
|
/* Cursor names (Version 2) */
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesSetCursorName(ClientPtr client);
|
ProcXFixesSetCursorName(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSetCursorName(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesGetCursorName(ClientPtr client);
|
ProcXFixesGetCursorName(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesGetCursorName(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesGetCursorImageAndName(ClientPtr client);
|
ProcXFixesGetCursorImageAndName(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesGetCursorImageAndName(ClientPtr client);
|
|
||||||
|
|
||||||
/* Cursor replacement (Version 2) */
|
/* Cursor replacement (Version 2) */
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesChangeCursor(ClientPtr client);
|
ProcXFixesChangeCursor(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesChangeCursor(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesChangeCursorByName(ClientPtr client);
|
ProcXFixesChangeCursorByName(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesChangeCursorByName(ClientPtr client);
|
|
||||||
|
|
||||||
/* Region objects (Version 2* */
|
/* Region objects (Version 2* */
|
||||||
Bool
|
Bool
|
||||||
XFixesRegionInit(void);
|
XFixesRegionInit(void);
|
||||||
|
@ -152,133 +124,70 @@ Bool
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegion(ClientPtr client);
|
ProcXFixesCreateRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCreateRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromBitmap(ClientPtr client);
|
ProcXFixesCreateRegionFromBitmap(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCreateRegionFromBitmap(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromWindow(ClientPtr client);
|
ProcXFixesCreateRegionFromWindow(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCreateRegionFromWindow(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromGC(ClientPtr client);
|
ProcXFixesCreateRegionFromGC(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCreateRegionFromGC(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreateRegionFromPicture(ClientPtr client);
|
ProcXFixesCreateRegionFromPicture(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCreateRegionFromPicture(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesDestroyRegion(ClientPtr client);
|
ProcXFixesDestroyRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesDestroyRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesSetRegion(ClientPtr client);
|
ProcXFixesSetRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSetRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCopyRegion(ClientPtr client);
|
ProcXFixesCopyRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCopyRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCombineRegion(ClientPtr client);
|
ProcXFixesCombineRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCombineRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesInvertRegion(ClientPtr client);
|
ProcXFixesInvertRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesInvertRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesTranslateRegion(ClientPtr client);
|
ProcXFixesTranslateRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesTranslateRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesRegionExtents(ClientPtr client);
|
ProcXFixesRegionExtents(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesRegionExtents(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesFetchRegion(ClientPtr client);
|
ProcXFixesFetchRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesFetchRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesSetGCClipRegion(ClientPtr client);
|
ProcXFixesSetGCClipRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSetGCClipRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesSetWindowShapeRegion(ClientPtr client);
|
ProcXFixesSetWindowShapeRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSetWindowShapeRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesSetPictureClipRegion(ClientPtr client);
|
ProcXFixesSetPictureClipRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSetPictureClipRegion(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesExpandRegion(ClientPtr client);
|
ProcXFixesExpandRegion(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesExpandRegion(ClientPtr client);
|
|
||||||
|
|
||||||
/* Cursor Visibility (Version 4) */
|
/* Cursor Visibility (Version 4) */
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesHideCursor(ClientPtr client);
|
ProcXFixesHideCursor(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesHideCursor(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesShowCursor(ClientPtr client);
|
ProcXFixesShowCursor(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesShowCursor(ClientPtr client);
|
|
||||||
|
|
||||||
/* Version 5 */
|
/* Version 5 */
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesCreatePointerBarrier(ClientPtr client);
|
ProcXFixesCreatePointerBarrier(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesCreatePointerBarrier(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXFixesDestroyPointerBarrier(ClientPtr client);
|
ProcXFixesDestroyPointerBarrier(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesDestroyPointerBarrier(ClientPtr client);
|
|
||||||
|
|
||||||
/* Version 6 */
|
/* Version 6 */
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
@ -290,12 +199,6 @@ int
|
||||||
int
|
int
|
||||||
ProcXFixesGetClientDisconnectMode(ClientPtr client);
|
ProcXFixesGetClientDisconnectMode(ClientPtr client);
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesSetClientDisconnectMode(ClientPtr client);
|
|
||||||
|
|
||||||
int
|
|
||||||
SProcXFixesGetClientDisconnectMode(ClientPtr client);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
XFixesShouldDisconnectClient(ClientPtr client);
|
XFixesShouldDisconnectClient(ClientPtr client);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue