summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-03-04 15:08:32 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-04-15 18:59:23 -0700
commit232cad9ec36631379b23ce29d577332f82565803 (patch)
tree610b389034511f242886ffab99b22593a6fd1592 /Xi
parentf789dca4e9e0ca5cfcdb1f95a7479cb1ca113738 (diff)
prevent name clash on Windows w/ RT_* defines
Windows' native headers using some our RT_* define's names for other things. Since the naming isn't very nice anyways, introducing some new ones (X11_RESTYPE_NONE, X11_RESTYPE_FONT, X11_RESTYPE_CURSOR) and define the old ones as an alias to them, in case some out-of-tree code still uses them. With thins change, we don't need to be so extremely careful about include ordering and have explicit #undef's in order to prevent name clashes on Win32 targets. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/closedev.c2
-rw-r--r--Xi/exevents.c12
-rw-r--r--Xi/xibarriers.c2
-rw-r--r--Xi/xichangecursor.c2
-rw-r--r--Xi/xipassivegrab.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/Xi/closedev.c b/Xi/closedev.c
index f68b5231a..af60d7e99 100644
--- a/Xi/closedev.c
+++ b/Xi/closedev.c
@@ -102,7 +102,7 @@ DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
next = grab->next;
if ((grab->device == dev) &&
(client->clientAsMask == CLIENT_BITS(grab->resource)))
- FreeResource(grab->resource, RT_NONE);
+ FreeResource(grab->resource, X11_RESTYPE_NONE);
}
}
diff --git a/Xi/exevents.c b/Xi/exevents.c
index e8267d3ea..7ef0f2df6 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1538,7 +1538,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
l = &ti->listeners[ti->num_listeners - 1];
l->listener = g->resource;
l->grab = g;
- //l->resource_type = RT_NONE;
+ //l->resource_type = X11_RESTYPE_NONE;
if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
l->type = TOUCH_LISTENER_POINTER_GRAB;
@@ -2504,7 +2504,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
cursor = NullCursor;
else {
rc = dixLookupResourceByType((void **) &cursor, param->cursor,
- RT_CURSOR, client, DixUseAccess);
+ X11_RESTYPE_CURSOR, client, DixUseAccess);
if (rc != Success) {
client->errorValue = param->cursor;
return rc;
@@ -2603,7 +2603,7 @@ GrabWindow(ClientPtr client, DeviceIntPtr dev, int type,
cursor = NullCursor;
else {
rc = dixLookupResourceByType((void **) &cursor, param->cursor,
- RT_CURSOR, client, DixUseAccess);
+ X11_RESTYPE_CURSOR, client, DixUseAccess);
if (rc != Success) {
client->errorValue = param->cursor;
return rc;
@@ -2691,7 +2691,7 @@ SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client,
if (i == EMASKSIZE) {
RecalculateDeviceDeliverableEvents(pWin);
if (ShouldFreeInputMasks(pWin, FALSE))
- FreeResource(others->resource, RT_NONE);
+ FreeResource(others->resource, X11_RESTYPE_NONE);
return Success;
}
}
@@ -3118,7 +3118,7 @@ DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources)
ic = inputMasks->inputClients;
for (i = 0; i < EMASKSIZE; i++)
inputMasks->dontPropagateMask[i] = 0;
- FreeResource(ic->resource, RT_NONE);
+ FreeResource(ic->resource, X11_RESTYPE_NONE);
}
}
@@ -3241,7 +3241,7 @@ DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask,
}
RecalculateDeviceDeliverableEvents(pWin);
if (ShouldFreeInputMasks(pWin, FALSE))
- FreeResource(inputMasks->inputClients->resource, RT_NONE);
+ FreeResource(inputMasks->inputClients->resource, X11_RESTYPE_NONE);
return Success;
}
diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index 809a81a0a..da6964453 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -831,7 +831,7 @@ XIDestroyPointerBarrier(ClientPtr client,
if (CLIENT_ID(stuff->barrier) != client->index)
return BadAccess;
- FreeResource(stuff->barrier, RT_NONE);
+ FreeResource(stuff->barrier, X11_RESTYPE_NONE);
return Success;
}
diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c
index bfa2e777c..9f2a616d9 100644
--- a/Xi/xichangecursor.c
+++ b/Xi/xichangecursor.c
@@ -99,7 +99,7 @@ ProcXIChangeCursor(ClientPtr client)
}
else {
rc = dixLookupResourceByType((void **) &pCursor, stuff->cursor,
- RT_CURSOR, client, DixUseAccess);
+ X11_RESTYPE_CURSOR, client, DixUseAccess);
if (rc != Success)
return rc;
}
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 6f1eca2a1..900a3e113 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -175,7 +175,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
if (stuff->cursor != None) {
ret = dixLookupResourceByType(&tmp, stuff->cursor,
- RT_CURSOR, client, DixUseAccess);
+ X11_RESTYPE_CURSOR, client, DixUseAccess);
if (ret != Success) {
client->errorValue = stuff->cursor;
goto out;