From 8f1e22e39481a89bef819d80236719e3c9fab4f9 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 17 Apr 2025 14:58:30 +0200 Subject: [PATCH] (!1918) dix: rename dixLookupClient() to dixLookupResourceOwner() Choose a bit more precise / descriptive name for that function. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/sync.c | 4 ++-- Xext/xselinux_ext.c | 2 +- Xi/xigetclientpointer.c | 2 +- Xi/xisetclientpointer.c | 2 +- dix/dispatch.c | 2 +- dix/dix_priv.h | 2 +- dix/dixutils.c | 2 +- miext/rootless/rootlessWindow.c | 2 +- test/meson.build | 2 +- test/xi2/protocol-common.c | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Xext/sync.c b/Xext/sync.c index ed8f6dde8..f8fce895f 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -1370,7 +1370,7 @@ ProcSyncSetPriority(ClientPtr client) if (stuff->id == None) priorityclient = client; else { - rc = dixLookupClient(&priorityclient, stuff->id, client, + rc = dixLookupResourceOwner(&priorityclient, stuff->id, client, DixSetAttrAccess); if (rc != Success) return rc; @@ -1406,7 +1406,7 @@ ProcSyncGetPriority(ClientPtr client) if (stuff->id == None) priorityclient = client; else { - rc = dixLookupClient(&priorityclient, stuff->id, client, + rc = dixLookupResourceOwner(&priorityclient, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c index f1248ea77..e5c782d24 100644 --- a/Xext/xselinux_ext.c +++ b/Xext/xselinux_ext.c @@ -298,7 +298,7 @@ ProcSELinuxGetClientContext(ClientPtr client) REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); - rc = dixLookupClient(&target, stuff->id, client, DixGetAttrAccess); + rc = dixLookupResourceOwner(&target, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; diff --git a/Xi/xigetclientpointer.c b/Xi/xigetclientpointer.c index 95fb6f2d1..cb633d5cb 100644 --- a/Xi/xigetclientpointer.c +++ b/Xi/xigetclientpointer.c @@ -67,7 +67,7 @@ ProcXIGetClientPointer(ClientPtr client) REQUEST_SIZE_MATCH(xXIGetClientPointerReq); if (stuff->win != None) { - rc = dixLookupClient(&winclient, stuff->win, client, DixGetAttrAccess); + rc = dixLookupResourceOwner(&winclient, stuff->win, client, DixGetAttrAccess); if (rc != Success) return BadWindow; diff --git a/Xi/xisetclientpointer.c b/Xi/xisetclientpointer.c index 1f9b6f95f..2f8808c93 100644 --- a/Xi/xisetclientpointer.c +++ b/Xi/xisetclientpointer.c @@ -82,7 +82,7 @@ ProcXISetClientPointer(ClientPtr client) pDev = GetMaster(pDev, MASTER_POINTER); if (stuff->win != None) { - rc = dixLookupClient(&targetClient, stuff->win, client, + rc = dixLookupResourceOwner(&targetClient, stuff->win, client, DixManageAccess); if (rc != Success) diff --git a/dix/dispatch.c b/dix/dispatch.c index ff5f510e9..0d7f98341 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3349,7 +3349,7 @@ ProcKillClient(ClientPtr client) return Success; } - rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess); + rc = dixLookupResourceOwner(&killclient, stuff->id, client, DixDestroyAccess); if (rc == Success) { CloseDownClient(killclient); if (client == killclient) { diff --git a/dix/dix_priv.h b/dix/dix_priv.h index 8e38b8517..97a26b491 100644 --- a/dix/dix_priv.h +++ b/dix/dix_priv.h @@ -94,7 +94,7 @@ int dixLookupGC(GCPtr *result, ClientPtr client, Mask access_mode); -int dixLookupClient(ClientPtr *result, +int dixLookupResourceOwner(ClientPtr *result, XID id, ClientPtr client, Mask access_mode); diff --git a/dix/dixutils.c b/dix/dixutils.c index e3b3791d4..877d76a90 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -218,7 +218,7 @@ dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access) } int -dixLookupClient(ClientPtr *result, XID id, ClientPtr client, Mask access_mode) +dixLookupResourceOwner(ClientPtr *result, XID id, ClientPtr client, Mask access_mode) { void *pRes; int rc = BadValue, clientIndex = CLIENT_ID(id); diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index fea3472c9..e9c941038 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -122,7 +122,7 @@ RootlessNativeWindowMoved(WindowPtr pWin) /* pretend we're the owner of the window! */ err = - dixLookupClient(&pClient, pWin->drawable.id, serverClient, + dixLookupResourceOwner(&pClient, pWin->drawable.id, serverClient, DixUnknownAccess); if (err != Success) { ErrorF("RootlessNativeWindowMoved(): Failed to lookup window: 0x%x\n", diff --git a/test/meson.build b/test/meson.build index 7c1663175..471032b64 100644 --- a/test/meson.build +++ b/test/meson.build @@ -218,7 +218,7 @@ if build_xorg unit_includes += [include_directories('xi1', 'xi2')] ldwraps = [ '-Wl,-wrap,dixLookupWindow', - '-Wl,-wrap,dixLookupClient', + '-Wl,-wrap,dixLookupResourceOwner', '-Wl,-wrap,WriteToClient', '-Wl,-wrap,dixLookupWindow', '-Wl,-wrap,XISetEventMask', diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c index f19cffa2f..2e64c7556 100644 --- a/test/xi2/protocol-common.c +++ b/test/xi2/protocol-common.c @@ -332,7 +332,7 @@ WRAP_FUNCTION(dixLookupWindow, int, extern ClientRec client_window; -WRAP_FUNCTION(dixLookupClient, int, +WRAP_FUNCTION(dixLookupResourceOwner, int, ClientPtr *pClient, XID rid, ClientPtr client, Mask access) { if (rid == ROOT_WINDOW_ID) @@ -343,5 +343,5 @@ WRAP_FUNCTION(dixLookupClient, int, return Success; } - return __real_dixLookupClient(pClient, rid, client, access); + return __real_dixLookupResourceOwner(pClient, rid, client, access); }