diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-12-31 00:24:41 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-01-15 16:38:11 +0100 |
commit | db3efd45c061594fcc90017586064ce833556d1e (patch) | |
tree | 0f740bcde9f06ef7ea93919e0fcf49531de40adc | |
parent | af2964c7ea294ab8dc910e31aa432453123fe537 (diff) | |
download | nx-libs-db3efd45c061594fcc90017586064ce833556d1e.tar.gz nx-libs-db3efd45c061594fcc90017586064ce833556d1e.tar.bz2 nx-libs-db3efd45c061594fcc90017586064ce833556d1e.zip |
nxagent: make nxagentBlocking an Boolean
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 14 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Handlers.h | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Pixels.h | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 90f4cc1b0..15112312f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -660,7 +660,7 @@ static void nxagentDisplayBlockHandler(Display *disp, int reason) fprintf(stderr, "nxagentDisplayBlockHandler: BLOCK! Display is blocking for [write].\n"); #endif - nxagentBlocking = 1; + nxagentBlocking = True; if (!SmartScheduleSignalEnable) { @@ -908,7 +908,7 @@ void nxagentResetDisplayHandlers(void) */ nxagentBuffer = 0; - nxagentBlocking = 0; + nxagentBlocking = False; nxagentCongestion = 0; /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 8b657beb7..dc4d15c80 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -2815,7 +2815,7 @@ int nxagentSynchronizationPredicate(void) return NotNeeded; } - if (nxagentBlocking == 0 && + if (!nxagentBlocking && nxagentCongestion <= 4 && nxagentReady == 0 && nxagentUserInput(NULL) == 0) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index a3624dbfc..cdba83264 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -122,7 +122,7 @@ Bool nxagentXdmcpAlertUp = False; */ int nxagentBuffer; -int nxagentBlocking; +Bool nxagentBlocking; int nxagentCongestion; double nxagentBytesIn; @@ -322,7 +322,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask) nxagentForceSynchronization = 0; } else if (nxagentUserInput(NULL) == 0 && - nxagentBlocking == 0 && + !nxagentBlocking && nxagentCongestion <= 4) { #ifdef TEST @@ -391,7 +391,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask) #ifdef DYNAMIC_DISPLAY_BUFFER - if (nxagentBlocking == 1 && + if (nxagentBlocking && nxagentBuffer > MINIMUM_DISPLAY_BUFFER) { nxagentBuffer >>= 1; @@ -587,7 +587,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask) * Can become true during the dispatch loop. */ - nxagentBlocking = 0; + nxagentBlocking = False; /* * Check if we got new events. @@ -759,7 +759,7 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas nxagentShadowSendUpdates(&suspended); - if (nxagentBlocking == 0) + if (!nxagentBlocking) { nxagentSynchronizeDrawable((DrawablePtr) nxagentShadowPixmapPtr, DONT_WAIT, ALWAYS_BREAK, nxagentShadowWindowPtr); @@ -830,7 +830,7 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask) * Can become true during the dispatch loop. */ - nxagentBlocking = 0; + nxagentBlocking = False; /* * Check if we got new events. @@ -1200,7 +1200,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out) nxagentDispatchEvents(NULL); - nxagentBlocking = 1; + nxagentBlocking = True; } /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.h b/nx-X11/programs/Xserver/hw/nxagent/Handlers.h index ddae097da..0d019cc22 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.h @@ -37,7 +37,7 @@ extern int nxagentBuffer; * the display to become writable. */ -extern int nxagentBlocking; +extern Bool nxagentBlocking; /* * Current congestion level based on diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixels.h b/nx-X11/programs/Xserver/hw/nxagent/Pixels.h index 181537009..7426acab2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixels.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixels.h @@ -77,7 +77,7 @@ while (0) #define breakOnBlocking(mask) \ (((mask) != NEVER_BREAK) && ((mask) & BLOCKING_BREAK) && \ - nxagentBlocking == 1) + nxagentBlocking) #define breakOnCongestion(mask) \ (((mask) != NEVER_BREAK) && ((mask) & CONGESTION_BREAK) && \ @@ -164,7 +164,7 @@ FIXME: Changed macro: NXAGENT_SHOULD_DEFER_COMPOSITE #define NXAGENT_SHOULD_SYNCHRONIZE_CORRUPTED_PIXMAPS(mask) \ ((nxagentCorruptedWindows == 0 && nxagentCorruptedPixmaps > 0 && \ - nxagentCongestion == 0 && nxagentBlocking == 0) || \ + nxagentCongestion == 0 && !nxagentBlocking) || \ mask == NEVER_BREAK) /* |