diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-03-22 00:40:55 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-03-22 00:40:55 +0100 |
commit | f5e7d555ad58368cb550b4516b75a1ac3765fda2 (patch) | |
tree | 000ba384ea14d1c4ba4b8023b37ec57f95c88f58 /nx-X11/programs/Xserver/hw | |
parent | b7c389b9a0fa366a40ab272a9429a52ecee7365d (diff) | |
parent | 565421ba18a09d20620e01fc877915a8b09a3735 (diff) | |
download | nx-libs-f5e7d555ad58368cb550b4516b75a1ac3765fda2.tar.gz nx-libs-f5e7d555ad58368cb550b4516b75a1ac3765fda2.tar.bz2 nx-libs-f5e7d555ad58368cb550b4516b75a1ac3765fda2.zip |
Merge branch 'sunweaver-pr/various-os-backports' into 3.6.x
Attributes GH PR #376: https://github.com/ArcticaProject/nx-libs/pull/376
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Display.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Display.h | 29 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 9 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 11 |
5 files changed, 29 insertions, 30 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index c683751f6..c764f50ae 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -669,7 +669,7 @@ static void nxagentDisplayBlockHandler(Display *display, int reason) nxagentBlocking = 1; - if (SmartScheduleDisable == 1) + if (!SmartScheduleSignalEnable) { /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.h b/nx-X11/programs/Xserver/hw/nxagent/Display.h index 75da371d8..759b0de35 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.h @@ -116,36 +116,29 @@ Bool nxagentReconnectDisplay(void *p0); * Deal with the smart scheduler. */ +#if HAVE_SETITIMER #define nxagentInitTimer() \ \ SmartScheduleInit(); #define nxagentStopTimer() \ \ - if (SmartScheduleTimerStopped == 0) \ - { \ - SmartScheduleStopTimer(); \ - } \ -\ - SmartScheduleIdle = 1; + SmartScheduleStopTimer(); \ #define nxagentStartTimer() \ \ - if (SmartScheduleTimerStopped == 1) \ - { \ - SmartScheduleStartTimer(); \ - } \ -\ - SmartScheduleIdle = 0; + SmartScheduleStartTimer(); #define nxagentDisableTimer() \ \ - if (SmartScheduleTimerStopped == 0) \ - { \ - SmartScheduleStopTimer(); \ - } \ -\ - SmartScheduleDisable = 1; + SmartScheduleStopTimer(); \ + SmartScheduleSignalEnable = FALSE; +#else +#define nxagentInitTimer() +#define nxagentStopTimer() +#define nxagentStartTimer() +#define nxagentDisableTimer() +#endif /* HAVE_SETITIMER */ /* * File descriptor currently used by diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index 8e80a1524..634f7aafd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -597,7 +597,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask) nxagentHandleConnectionStates(); } - if (SmartScheduleDisable == 1) + if (!SmartScheduleSignalEnable) { #ifdef DEBUG @@ -885,7 +885,7 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask) nxagentHandleConnectionStates(); } - if (SmartScheduleDisable == 1) + if (!SmartScheduleSignalEnable) { #ifdef DEBUG @@ -1075,7 +1075,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out) #endif } - if (SmartScheduleDisable == 1) + if (!SmartScheduleSignalEnable) { /* @@ -1150,7 +1150,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out) * the inner dispatch loop forever. */ - if (SmartScheduleDisable == 1) + if (!SmartScheduleSignalEnable) { if (client -> index != nxagentDispatch.client) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 652d54479..5792a41c5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -387,7 +387,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #endif - if (nready && !SmartScheduleDisable) + if (nready) { clientReady[0] = SmartScheduleClient (clientReady, nready); nready = 1; @@ -422,8 +422,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio ProcessInputEvents(); FlushIfCriticalOutputPending(); } - if (!SmartScheduleDisable && - (SmartScheduleTime - start_tick) >= SmartScheduleSlice) + if ((SmartScheduleTime - start_tick) >= SmartScheduleSlice) { /* Penalize clients which consume ticks */ if (client->smart_priority > SMART_MIN_PRIORITY) @@ -512,6 +511,10 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio result = (* client->requestVector[MAJOROP])(client); #endif + + if (!SmartScheduleSignalEnable) + SmartScheduleTime = GetTimeInMillis(); + if (result != Success) { if (client->noClientException != Success) diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index af5fc88f8..d204acdc5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -178,6 +178,13 @@ different from the user's real uid. .B \-core causes the server to generate a core dump on fatal errors. .TP 8 +.B \-displayfd \fIfd\fP +specifies a file descriptor in the launching process. Rather than specify +a display number, the X server will attempt to listen on successively higher +display numbers, and upon finding a free one, will write the port number back +on this file descriptor as a newline-terminated string. The \-pn option is +ignored when using \-displayfd. +.TP 8 .B \-deferglyphs \fIwhichfonts\fP specifies the types of fonts for which the server should attempt to use deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), @@ -295,10 +302,6 @@ required by the X protocol, which allows the server to exceed the client's backing store expectations but does not provide a way to tell the client that it is doing so. .TP 8 -.B \-x \fIextension\fP -loads the specified extension at init. -This is a no-op for most implementations. -.TP 8 .B [+-]xinerama enables(+) or disables(-) XINERAMA provided via the PanoramiX extension. This is set to off by default. |