From 1f69f2d037d0f79b23c7da9d0cb3536b8483fa4d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 14:59:58 +1100 Subject: [PATCH] requestingClient is an xprintism, hide it for other servers. (cherry picked from commit 7c0709a736c0f3aa011de67dd2c2962585ab146e) --- dix/dispatch.c | 4 ++++ dix/dixfonts.c | 5 ++++- dix/globals.c | 2 ++ hw/xnest/Font.c | 2 ++ include/dix.h | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 1cb04233b..ec1ec6381 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -452,7 +452,9 @@ Dispatch(void) } isItTimeToYield = FALSE; +#ifdef XPRINT requestingClient = client; +#endif #ifdef SMART_SCHEDULE start_tick = SmartScheduleTime; #endif @@ -527,7 +529,9 @@ Dispatch(void) if (client) client->smart_stop_tick = SmartScheduleTime; #endif +#ifdef XPRINT requestingClient = NULL; +#endif } dispatchException &= ~DE_PRIORITYCHANGE; } diff --git a/dix/dixfonts.c b/dix/dixfonts.c index a9f03ae96..3043ccd30 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1918,12 +1918,15 @@ GetDefaultPointSize () FontResolutionPtr GetClientResolutions (int *num) { +#ifdef XPRINT if (requestingClient && requestingClient->fontResFunc != NULL && !requestingClient->clientGone) { return (*requestingClient->fontResFunc)(requestingClient, num); } - else { + else +#endif + { static struct _FontResolution res; ScreenPtr pScreen; diff --git a/dix/globals.c b/dix/globals.c index f86c6026d..878bb7d50 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -144,7 +144,9 @@ Bool loadableFonts = FALSE; CursorPtr rootCursor; Bool blackRoot=FALSE; Bool whiteRoot=FALSE; +#ifdef XPRINT ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ +#endif _X_EXPORT TimeStamp currentTime; _X_EXPORT TimeStamp lastDeviceEventTime; diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c index 72edcee9a..9f30085b1 100644 --- a/hw/xnest/Font.c +++ b/hw/xnest/Font.c @@ -44,8 +44,10 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) FontSetPrivate(pFont, xnestFontPrivateIndex, NULL); +#ifdef XPRINT if (requestingClient && XpClientIsPrintClient(requestingClient, NULL)) return True; +#endif name_atom = MakeAtom("FONT", 4, True); value_atom = 0L; diff --git a/include/dix.h b/include/dix.h index c1d609a61..d00b3e9f0 100644 --- a/include/dix.h +++ b/include/dix.h @@ -129,7 +129,9 @@ typedef struct _Client *ClientPtr; /* also in misc.h */ typedef struct _WorkQueue *WorkQueuePtr; +#ifdef XPRINT extern ClientPtr requestingClient; +#endif extern ClientPtr *clients; extern ClientPtr serverClient; extern int currentMaxClients;