rename remaining RT_* defines to X11_RESTYPE_*

Since we already had to rename some of them, in order to fix name clashes
on win32, it's now time to rename all the remaining ones.

The old ones are still present as define's to the new ones, just for
backwards compatibility.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-03-11 11:01:02 +01:00
committed by Alan Coopersmith
parent 1ca48d0a48
commit 85d4bd0dba
39 changed files with 186 additions and 173 deletions

View File

@@ -597,7 +597,9 @@ typedef struct {
} ReplaceCursorLookupRec, *ReplaceCursorLookupPtr;
static const RESTYPE CursorRestypes[] = {
RT_WINDOW, RT_PASSIVEGRAB, X11_RESTYPE_CURSOR
X11_RESTYPE_WINDOW,
X11_RESTYPE_PASSIVEGRAB,
X11_RESTYPE_CURSOR
};
static Bool
@@ -610,14 +612,14 @@ ReplaceCursorLookup(void *value, XID id, void *closure)
XID cursor = 0;
switch (rcl->type) {
case RT_WINDOW:
case X11_RESTYPE_WINDOW:
pWin = (WindowPtr) value;
if (pWin->optional) {
pCursorRef = &pWin->optional->cursor;
pCursor = *pCursorRef;
}
break;
case RT_PASSIVEGRAB:
case X11_RESTYPE_PASSIVEGRAB:
pGrab = (GrabPtr) value;
pCursorRef = &pGrab->cursor;
pCursor = *pCursorRef;
@@ -856,7 +858,7 @@ ProcXFixesHideCursor(ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesHideCursorReq);
ret = dixLookupResourceByType((void **) &pWin, stuff->window, RT_WINDOW,
ret = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
client, DixGetAttrAccess);
if (ret != Success) {
client->errorValue = stuff->window;
@@ -920,7 +922,7 @@ ProcXFixesShowCursor(ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesShowCursorReq);
rc = dixLookupResourceByType((void **) &pWin, stuff->window, RT_WINDOW,
rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
client, DixGetAttrAccess);
if (rc != Success) {
client->errorValue = stuff->window;

View File

@@ -117,7 +117,7 @@ ProcXFixesCreateRegionFromBitmap(ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq);
LEGAL_NEW_RESOURCE(stuff->region, client);
rc = dixLookupResourceByType((void **) &pPixmap, stuff->bitmap, RT_PIXMAP,
rc = dixLookupResourceByType((void **) &pPixmap, stuff->bitmap, X11_RESTYPE_PIXMAP,
client, DixReadAccess);
if (rc != Success) {
client->errorValue = stuff->bitmap;
@@ -161,7 +161,7 @@ ProcXFixesCreateRegionFromWindow(ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq);
LEGAL_NEW_RESOURCE(stuff->region, client);
rc = dixLookupResourceByType((void **) &pWin, stuff->window, RT_WINDOW,
rc = dixLookupResourceByType((void **) &pWin, stuff->window, X11_RESTYPE_WINDOW,
client, DixGetAttrAccess);
if (rc != Success) {
client->errorValue = stuff->window;
@@ -652,7 +652,7 @@ ProcXFixesSetWindowShapeRegion(ClientPtr client)
REQUEST(xXFixesSetWindowShapeRegionReq);
REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
rc = dixLookupResourceByType((void **) &pWin, stuff->dest, RT_WINDOW,
rc = dixLookupResourceByType((void **) &pWin, stuff->dest, X11_RESTYPE_WINDOW,
client, DixSetAttrAccess);
if (rc != Success) {
client->errorValue = stuff->dest;