From 54806eabdc6f0ea7be5ea45b7ca7b8762b2e4464 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 22 May 2025 17:58:57 +0200 Subject: [PATCH] dix: unexport SetInputCheck() and make it inline Not used by any drivers, so no need to keep it exported. It's also so simple (and rarely called) that easily can be inlined. Also unexport HWEventQueueType and HWEventQueuePtr, since they're not used by any drivers. Signed-off-by: Enrico Weigelt, metux IT consult --- dix/dispatch.c | 7 ------- dix/dix_priv.h | 10 ++++++++++ include/dix.h | 6 ------ mi/mieq.c | 1 + 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index b3e5feacc..c34abc0c4 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -204,13 +204,6 @@ GetCurrentClient(void) return currentClient; } -void -SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1) -{ - checkForInput[0] = c0; - checkForInput[1] = c1; -} - void UpdateCurrentTime(void) { diff --git a/dix/dix_priv.h b/dix/dix_priv.h index 47c18817f..4a0763468 100644 --- a/dix/dix_priv.h +++ b/dix/dix_priv.h @@ -33,6 +33,9 @@ extern char dispatchExceptionAtReset; extern int terminateDelay; extern Bool touchEmulatePointer; +typedef int HWEventQueueType; +typedef HWEventQueueType *HWEventQueuePtr; + extern HWEventQueuePtr checkForInput[2]; /* -retro mode */ @@ -44,6 +47,13 @@ InputCheckPending(void) return (*checkForInput[0] != *checkForInput[1]); } +static inline void SetInputCheck( + HWEventQueuePtr c0, HWEventQueuePtr c1) +{ + checkForInput[0] = c0; + checkForInput[1] = c1; +} + void ClearWorkQueue(void); void ProcessWorkQueue(void); void ProcessWorkQueueZombies(void); diff --git a/include/dix.h b/include/dix.h index e40a3e64c..2a7cd6f35 100644 --- a/include/dix.h +++ b/include/dix.h @@ -136,13 +136,7 @@ typedef struct _TimeStamp { CARD32 milliseconds; } TimeStamp; -typedef int HWEventQueueType; -typedef HWEventQueueType *HWEventQueuePtr; - /* dispatch.c */ -extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ , - HWEventQueuePtr /*c1 */ ); - extern _X_EXPORT void UpdateCurrentTime(void); extern _X_EXPORT void UpdateCurrentTimeIf(void); diff --git a/mi/mieq.c b/mi/mieq.c index dea7761da..00ec4be4e 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -42,6 +42,7 @@ in this Software without prior written authorization from The Open Group. #include #include "dix/cursor_priv.h" +#include "dix/dix_priv.h" #include "mi/mi_priv.h" #include "mi/mipointer_priv.h" #include "os/bug_priv.h"