aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-02-05 13:02:30 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-02-05 13:02:30 +0100
commitb1c42dc98bea8b99eb8a2b1618421bdb698cf690 (patch)
tree4425126f0e53713d613274f209494be9e51534d7
parent995350d14335d8b5ef52dba47c7ae8d942901b10 (diff)
parent7db6cff1cd9f4f7c7ae8b34866dd921bddf31642 (diff)
downloadnx-libs-b1c42dc98bea8b99eb8a2b1618421bdb698cf690.tar.gz
nx-libs-b1c42dc98bea8b99eb8a2b1618421bdb698cf690.tar.bz2
nx-libs-b1c42dc98bea8b99eb8a2b1618421bdb698cf690.zip
Merge branch 'uli42-pr/some_cleanups' into 3.6.x
Attributes GH PR #626: https://github.com/ArcticaProject/nx-libs/pull/626
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Composite.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Dialog.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c7
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c13
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c20
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Splash.c12
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Split.c14
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c6
13 files changed, 51 insertions, 49 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c
index 38d877ed7..1149545eb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c
@@ -517,12 +517,12 @@ void nxagentCheckRestartedClients(struct timeval **timeout)
if (FD_ISSET(fd, &ClientsWithInput))
{
#ifdef WARNING
- fprintf(stderr, "nxagentBlockHandler: WARNING! Client [%d] with fd [%d] has input.\n",
+ fprintf(stderr, "nxagentCheckRestartedClients: WARNING! Client [%d] with fd [%d] has input.\n",
clients[i] -> index, fd);
#endif
#ifdef DEBUG
- fprintf(stderr, "nxagentBlockHandler: Setting a null timeout with former timeout [%ld] Ms.\n",
+ fprintf(stderr, "nxagentCheckRestartedClients: Setting a null timeout with former timeout [%ld] Ms.\n",
(*timeout) -> tv_sec * 1000 + (*timeout) -> tv_usec / 1000);
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Composite.c b/nx-X11/programs/Xserver/hw/nxagent/Composite.c
index bd84c52b0..8f1579443 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Composite.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Composite.c
@@ -110,7 +110,7 @@ void nxagentCompositeExtensionInit()
#ifdef TEST
else
{
- fprintf(stderr, "nxagentRenderExtensionInit: Use of the composite extension not enabled.\n");
+ fprintf(stderr, "nxagentCompositeExtensionInit: Use of the composite extension not enabled.\n");
}
#endif
}
@@ -188,7 +188,7 @@ void nxagentUnredirectWindow(WindowPtr pWin)
if (nxagentWindowPriv(pWin) -> isRedirected == 1)
{
#ifdef TEST
- fprintf(stderr, "nxagentRedirectWindow: Disabling redirection of window id [%ld] "
+ fprintf(stderr, "nxagentUnredirectWindow: Disabling redirection of window id [%ld] "
"to off-screen memory.\n", nxagentWindow(pWin));
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
index c09618693..73bd37a19 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
@@ -91,7 +91,7 @@ void nxagentResetDialog(int pid)
else if (pid == nxagentFontsReplacementDialogPid)
{
#ifdef TEST
- fprintf(stderr, "nxagentFontsReplacementDialog: Resetting fonts replacement dialog pid [%d].\n",
+ fprintf(stderr, "nxagentResetDialog: Resetting fonts replacement dialog pid [%d].\n",
nxagentFontsReplacementDialogPid);
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 0b6e0cafb..315b6572e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -3948,7 +3948,7 @@ void nxagentUngrabPointerAndKeyboard(XEvent *X)
XUngrabKeyboard(nxagentDisplay, now);
#ifdef TEST
- fprintf(stderr, "nxagentGrabPointerAndKeyboard: Going to ungrab the pointer in context [B6].\n");
+ fprintf(stderr, "nxagentUngrabPointerAndKeyboard: Going to ungrab the pointer in context [B6].\n");
#endif
XUngrabPointer(nxagentDisplay, now);
@@ -3958,10 +3958,11 @@ void nxagentDeactivatePointerGrab()
{
GrabPtr grab = inputInfo.pointer -> grab;
- XButtonEvent X;
-
if (grab)
{
+ XButtonEvent X;
+ memset(&X, 0, sizeof(XButtonEvent));
+
X.type = ButtonRelease;
X.serial = 0;
X.send_event = FALSE;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index 634f7aafd..e4c05685b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -423,7 +423,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
}
#ifdef TEST
- fprintf(stderr, "nxagentDispatchHandler: Reducing the display buffer to [%d] bytes.\n",
+ fprintf(stderr, "nxagentBlockHandler: Reducing the display buffer to [%d] bytes.\n",
nxagentBuffer);
#endif
@@ -435,7 +435,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
nxagentBuffer = nxagentOption(DisplayBuffer);
#ifdef TEST
- fprintf(stderr, "nxagentDispatchHandler: Increasing the display buffer to [%d] bytes.\n",
+ fprintf(stderr, "nxagentBlockHandler: Increasing the display buffer to [%d] bytes.\n",
nxagentBuffer);
#endif
@@ -590,7 +590,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask)
#endif
#ifdef TEST
- fprintf(stderr, "nxagentBlockHandler: Calling nxagentHandleConnectionStates "
+ fprintf(stderr, "nxagentWakeupHandler: Calling nxagentHandleConnectionStates "
"with ioError [%d] sigHup [%d].\n", nxagentException.ioError, nxagentException.sigHup);
#endif
@@ -743,14 +743,14 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
if (nxagentSessionState == SESSION_DOWN && nxagentOption(SleepTime) > 0)
{
#ifdef TEST
- fprintf(stderr, "nxagentBlockHandler: sleeping for %d milliseconds for slowdown.\n",
+ fprintf(stderr, "nxagentShadowBlockHandler: sleeping for %d milliseconds for slowdown.\n",
nxagentOption(SleepTime));
#endif
usleep(nxagentOption(SleepTime) * 1000);
}
#ifdef TEST
else if (0 == nxagentOption(SleepTime)) {
- fprintf(stderr, "nxagentBlockHandler: not sleeping for slowdown.\n");
+ fprintf(stderr, "nxagentShadowBlockHandler: not sleeping for slowdown.\n");
}
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index ca7086d62..44b1033a3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -378,14 +378,14 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
* that the agent is ready.
*/
- if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch))
- {
- nxagentRemoveSplashWindow(NULL);
- }
+ if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch))
+ {
+ nxagentRemoveSplashWindow(NULL);
+ }
- nxagentClients = nClients;
+ nxagentClients = nClients;
- #endif
+ #endif
if (nready)
{
@@ -540,6 +540,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
#if defined(DDXBEFORERESET)
ddxBeforeReset ();
#endif
+ /* FIXME: maybe move the code upto the KillAllClients() call to ddxBeforeReset? */
if ((dispatchException & DE_RESET) &&
(serverGeneration > nxagentMaxAllowedResets))
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 853621709..6a02f2f56 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -540,7 +540,7 @@ Bool nxagentDestroyVirtualPixmap(PixmapPtr pPixmap)
RegionPtr nxagentPixmapToRegion(PixmapPtr pPixmap)
{
#ifdef TEST
- fprintf(stderr, "PixmapToRegion: Pixmap = [%p] nxagentVirtualPixmap = [%p]\n",
+ fprintf(stderr, "nxagentPixmapToRegion: Pixmap = [%p] nxagentVirtualPixmap = [%p]\n",
(void *) pPixmap, (void *) nxagentVirtualPixmap(pPixmap));
#endif
@@ -727,7 +727,7 @@ PixmapPtr nxagentPixmapPtr(Pixmap pixmap)
if (pair.pMap == NULL)
{
- fprintf(stderr, "nxagentFindPixmap: WARNING! Failed to find "
+ fprintf(stderr, "nxagentPixmapPtr: WARNING! Failed to find "
"remote pixmap [%ld].\n", (long int) pair.pixmap);
}
else if (nxagentDrawableStatus((DrawablePtr) pair.pMap) == NotSynchronized)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index 4774579aa..b81796bfd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -463,7 +463,7 @@ Bool nxagentReconnectSession(void)
failedStep = DISPLAY_STEP;
#ifdef TEST
- fprintf(stderr, "nxagentReconnect: WARNING! Failed display reconnection.\n");
+ fprintf(stderr, "nxagentReconnectSession: WARNING! Failed display reconnection.\n");
#endif
goto nxagentReconnectError;
@@ -491,7 +491,7 @@ Bool nxagentReconnectSession(void)
else
{
#ifdef WARNING
- fprintf(stderr, "nxagentReconnect: WARNING! Unable to retrieve all the fonts currently in use. "
+ fprintf(stderr, "nxagentReconnectSession: WARNING! Unable to retrieve all the fonts currently in use. "
"Missing fonts have been replaced.\n");
#endif
@@ -594,7 +594,7 @@ Bool nxagentReconnectSession(void)
#ifdef WARNING
if (nxagentVerbose == 1)
{
- fprintf(stderr, "nxagentReconnect: Failed to reset keyboard device.\n");
+ fprintf(stderr, "nxagentReconnectSession: Failed to reset keyboard device.\n");
}
#endif
@@ -638,7 +638,7 @@ Bool nxagentReconnectSession(void)
if (nxagentSessionState != SESSION_GOING_UP)
{
#ifdef WARNING
- fprintf(stderr, "nxagentReconnect: WARNING! Unexpected session state [%s] while reconnecting.\n",
+ fprintf(stderr, "nxagentReconnectSession: WARNING! Unexpected session state [%s] while reconnecting.\n",
DECODE_SESSION_STATE(nxagentSessionState));
#endif
@@ -666,7 +666,7 @@ Bool nxagentReconnectSession(void)
*/
#ifdef TEST
- fprintf(stderr, "nxagentReconnect: Setting the NX flush policy to deferred.\n");
+ fprintf(stderr, "nxagentReconnectSession: Setting the NX flush policy to deferred.\n");
#endif
NXSetDisplayPolicy(nxagentDisplay, NXPolicyDeferred);
@@ -680,7 +680,7 @@ nxagentReconnectError:
if (failedStep == DISPLAY_STEP)
{
#ifdef TEST
- fprintf(stderr, "nxagentReconnect: Reconnection failed in display step. Restoring options.\n");
+ fprintf(stderr, "nxagentReconnectSession: Reconnection failed in display step. Restoring options.\n");
#endif
nxagentRestoreOptions();
@@ -695,19 +695,19 @@ nxagentReconnectError:
#ifdef WARNING
if (nxagentVerbose == 1)
{
- fprintf(stderr, "nxagentReconnect: WARNING! The reconnect error message is not set. Failed step is [%d].\n",
+ fprintf(stderr, "nxagentReconnectSession: WARNING! The reconnect error message is not set. Failed step is [%d].\n",
failedStep);
}
#endif
#ifdef TEST
- fprintf(stderr, "nxagentReconnect: Reconnection failed due to a display error.\n");
+ fprintf(stderr, "nxagentReconnectSession: Reconnection failed due to a display error.\n");
#endif
}
else
{
#ifdef TEST
- fprintf(stderr, "nxagentReconnect: Reconnection failed with reason '%s'\n",
+ fprintf(stderr, "nxagentReconnectSession: Reconnection failed with reason '%s'\n",
nxagentGetReconnectError());
#endif
}
@@ -721,7 +721,7 @@ nxagentReconnectError:
#ifdef TEST
else
{
- fprintf(stderr, "nxagentReconnect: Cannot launch the dialog without a valid display.\n");
+ fprintf(stderr, "nxagentReconnectSession: Cannot launch the dialog without a valid display.\n");
}
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
index 437140f61..a115dd155 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
@@ -1002,7 +1002,7 @@ void nxagentImportProperty(Window window,
wmHints.flags &= ~IconWindowHint;
#ifdef WARNING
- fprintf(stderr, "nxagenImportProperty: WARNING! Failed to look up remote icon "
+ fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote icon "
"window %x from hint importing property [%ld] type %s on window %p.\n",
(unsigned int) wmHints.icon_window,
(long int) property, typeS, (void *) pWin);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 75e448ceb..c5aa38929 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -2780,7 +2780,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
#endif
#ifdef TEST
- fprintf(stderr, "nxagentAddXConnection: Adding the X connection [%d] "
+ fprintf(stderr, "nxagentShadowInit: Adding the X connection [%d] "
"to the device set.\n", fd);
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
index 0d3c2ff22..bc86fed36 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
@@ -86,14 +86,14 @@ int nxagentShowSplashWindow(Window parentWindow)
GC gc;
#ifdef TEST
- fprintf(stderr, "nxagentShowSplash: Got called.\n");
+ fprintf(stderr, "nxagentShowSplashWindow: Got called.\n");
#endif
#ifdef NXAGENT_TIMESTAMP
{
extern unsigned long startTime;
- fprintf(stderr, "nxagentShowSplash: Initializing splash start at [%d] milliseconds.\n",
+ fprintf(stderr, "nxagentShowSplashWindow: Initializing splash start at [%d] milliseconds.\n",
GetTimeInMillis() - startTime);
}
#endif
@@ -133,7 +133,7 @@ int nxagentShowSplashWindow(Window parentWindow)
getAttributes.height = nxagentOption(RootHeight);
#ifdef TEST
- fprintf(stderr, "nxagentShowSplash: Going to create new splash window.\n");
+ fprintf(stderr, "nxagentShowSplashWindow: Going to create new splash window.\n");
#endif
nxagentSplashWindow =
@@ -146,7 +146,7 @@ int nxagentShowSplashWindow(Window parentWindow)
BlackPixel (nxagentDisplay, 0));
#ifdef TEST
- fprintf(stderr, "nxagentShowSplash: Created new splash window with id [%ld].\n",
+ fprintf(stderr, "nxagentShowSplashWindow: Created new splash window with id [%ld].\n",
nxagentSplashWindow);
#endif
@@ -162,7 +162,7 @@ int nxagentShowSplashWindow(Window parentWindow)
#ifdef NXAGENT_TIMESTAMP
{
extern unsigned long startTime;
- fprintf(stderr, "nxagentShowSplash: Splash ends [%d] milliseconds.\n",
+ fprintf(stderr, "nxagentShowSplashWindow: Splash ends [%d] milliseconds.\n",
GetTimeInMillis() - startTime);
}
#endif
@@ -185,7 +185,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
}
#ifdef DEBUG
- fprintf(stderr, "nxagenShowtLogo: Got called.\n");
+ fprintf(stderr, "nxagentPaintLogo: Got called.\n");
#endif
#ifdef NXAGENT_LOGO_DEBUG
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c
index 9b9691b02..f66a97a2c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Split.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c
@@ -492,14 +492,14 @@ void nxagentReleaseSplit(DrawablePtr pDrawable)
"commits are invalid.\n", pResource -> split);
#endif
- FatalError("nxagentCheckSplit: PANIC! Found a region for resource [%d] but the "
+ FatalError("nxagentReleaseSplit: PANIC! Found a region for resource [%d] but the "
"commits are invalid.\n", pResource -> split);
}
#endif
#ifdef TEST
- fprintf(stderr, "nxagentValidateSplit: Aborting the data transfer for resource [%d].\n",
+ fprintf(stderr, "nxagentReleaseSplit: Aborting the data transfer for resource [%d].\n",
pResource -> split);
#endif
@@ -734,7 +734,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
if (pResource == NULL)
{
#ifdef TEST
- fprintf(stderr, "++++++nxagentWaitDrawable: WARNING! The drawable at [%p] is already awake.\n",
+ fprintf(stderr, "nxagentWaitDrawable: WARNING! The drawable at [%p] is already awake.\n",
(void *) pDrawable);
#endif
@@ -742,7 +742,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
}
#ifdef TEST
- fprintf(stderr, "++++++nxagentWaitDrawable: Waiting drawable at [%p] with resource [%d].\n",
+ fprintf(stderr, "nxagentWaitDrawable: Waiting drawable at [%p] with resource [%d].\n",
(void *) pDrawable, pResource -> split);
#endif
@@ -786,12 +786,12 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
if (NXDisplayError(nxagentDisplay) == 1)
{
- fprintf(stderr, "++++++nxagentWaitDrawable: WARNING! Display error detected while "
+ fprintf(stderr, "nxagentWaitDrawable: WARNING! Display error detected while "
"waiting for the drawable.\n");
}
else
{
- fprintf(stderr, "++++++nxagentWaitDrawable: Drawable at [%p] can now be restarted.\n",
+ fprintf(stderr, "nxagentWaitDrawable: Drawable at [%p] can now be restarted.\n",
(void *) pDrawable);
}
@@ -801,7 +801,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
}
#ifdef TEST
- fprintf(stderr, "++++++nxagentWaitDrawable: Yielding control to the NX transport.\n");
+ fprintf(stderr, "nxagentWaitDrawable: Yielding control to the NX transport.\n");
#endif
nxagentWaitEvents(nxagentDisplay, NULL);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 1cad4ca03..977b955a6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -283,7 +283,7 @@ Bool nxagentCreateWindow(pWin)
nxagentClearSplash(nxagentRootTileWindow);
}
#ifdef NXAGENT_LOGO_DEBUG
- fprintf(stderr, "nxagentSplashCount: %d\n", nxagentSplashCount);
+ fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount);
#endif
if (pWin->drawable.class == InputOnly) {
@@ -303,7 +303,7 @@ Bool nxagentCreateWindow(pWin)
attributes.backing_store = NotUseful;
#ifdef TEST
- fprintf(stderr, "nxagentCreateWindow: Backing store on window at %p is %d.\n",
+ fprintf(stderr, "nxagentCreateWindow: Backing store on window at [%p] is [%d].\n",
(void*)pWin, attributes.backing_store);
#endif
@@ -2865,7 +2865,7 @@ Bool nxagentSetWindowCursors(void *p0)
}
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
- fprintf(stderr, "nxagentLoopOverWindows: All cursors configured.\n");
+ fprintf(stderr, "nxagentSetWindowCursors: All cursors configured.\n");
#endif
nxagentReDisplayCurrentCursor();