diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Reconnect.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 602351d10..d0f83e7bd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -220,7 +220,7 @@ int nxagentHandleConnectionStates(void) } } - if (nxagentNeedConnectionChange() == 1) + if (nxagentNeedConnectionChange()) { #ifdef TEST fprintf(stderr, "nxagentHandleConnectionStates: Calling nxagentHandleConnectionChanges " @@ -240,7 +240,7 @@ TODO: This should be reset only when the state became SESSION_DOWN. */ nxagentException.ioError = 0; - if (nxagentOption(Persistent) == 1 && nxagentSessionState != SESSION_STARTING) + if (nxagentOption(Persistent) && nxagentSessionState != SESSION_STARTING) { if (nxagentSessionState == SESSION_UP) { @@ -458,7 +458,7 @@ Bool nxagentReconnectSession(void) nxagentProcessOptions(nxagentOptionsFilenameOrString); - if (nxagentReconnectDisplay(reconnectLossyLevel[DISPLAY_STEP]) == 0) + if (!nxagentReconnectDisplay(reconnectLossyLevel[DISPLAY_STEP])) { #ifdef TEST fprintf(stderr, "nxagentReconnectSession: WARNING! Failed display reconnection.\n"); @@ -468,7 +468,7 @@ Bool nxagentReconnectSession(void) goto nxagentReconnectError; } - if (nxagentReconnectScreen(reconnectLossyLevel[SCREEN_STEP]) == 0) + if (!nxagentReconnectScreen(reconnectLossyLevel[SCREEN_STEP])) { failedStep = SCREEN_STEP; goto nxagentReconnectError; @@ -478,9 +478,9 @@ Bool nxagentReconnectSession(void) nxagentListRemoteFonts("*", nxagentMaxFontNames); - if (nxagentReconnectAllFonts(reconnectLossyLevel[FONT_STEP]) == 0) + if (!nxagentReconnectAllFonts(reconnectLossyLevel[FONT_STEP])) { - if (nxagentReconnectFailedFonts(reconnectLossyLevel[FONT_STEP]) == 0) + if (!nxagentReconnectFailedFonts(reconnectLossyLevel[FONT_STEP])) { failedStep = FONT_STEP; goto nxagentReconnectError; @@ -515,26 +515,26 @@ Bool nxagentReconnectSession(void) nxagentEmptyBSPixmapList(); /* FIXME: nxagentReconnectAllPixmaps will always return 1 */ - if (nxagentReconnectAllPixmaps(reconnectLossyLevel[PIXMAP_STEP]) == 0) + if (!nxagentReconnectAllPixmaps(reconnectLossyLevel[PIXMAP_STEP])) { failedStep = PIXMAP_STEP; goto nxagentReconnectError; } - if (nxagentReconnectAllGCs(reconnectLossyLevel[GC_STEP]) == 0) + if (!nxagentReconnectAllGCs(reconnectLossyLevel[GC_STEP])) { failedStep = GC_STEP; goto nxagentReconnectError; } - if (nxagentReconnectAllColormap(reconnectLossyLevel[COLORMAP_STEP]) == 0) + if (!nxagentReconnectAllColormap(reconnectLossyLevel[COLORMAP_STEP])) { failedStep = COLORMAP_STEP; goto nxagentReconnectError; } - if (nxagentReconnectAllWindows(reconnectLossyLevel[WINDOW_STEP]) == 0) + if (!nxagentReconnectAllWindows(reconnectLossyLevel[WINDOW_STEP])) { failedStep = WINDOW_STEP; goto nxagentReconnectError; @@ -542,32 +542,32 @@ Bool nxagentReconnectSession(void) if (nxagentRenderEnable) { - if (nxagentReconnectAllGlyphSet(reconnectLossyLevel[GLYPHSET_STEP]) == 0) + if (!nxagentReconnectAllGlyphSet(reconnectLossyLevel[GLYPHSET_STEP])) { failedStep = GLYPHSET_STEP; goto nxagentReconnectError; } - if (nxagentReconnectAllPictFormat(reconnectLossyLevel[PICTFORMAT_STEP]) == 0) + if (!nxagentReconnectAllPictFormat(reconnectLossyLevel[PICTFORMAT_STEP])) { failedStep = PICTFORMAT_STEP; goto nxagentReconnectError; } - if (nxagentReconnectAllPicture(reconnectLossyLevel[PICTURE_STEP]) == 0) + if (!nxagentReconnectAllPicture(reconnectLossyLevel[PICTURE_STEP])) { failedStep = PICTURE_STEP; goto nxagentReconnectError; } } - if (nxagentReconnectAllCursor(reconnectLossyLevel[CURSOR_STEP]) == 0) + if (!nxagentReconnectAllCursor(reconnectLossyLevel[CURSOR_STEP])) { failedStep = CURSOR_STEP; goto nxagentReconnectError; } - if (nxagentSetWindowCursors(reconnectLossyLevel[WINDOW_STEP]) == 0) + if (!nxagentSetWindowCursors(reconnectLossyLevel[WINDOW_STEP])) { failedStep = WINDOW_STEP; goto nxagentReconnectError; @@ -588,7 +588,7 @@ Bool nxagentReconnectSession(void) } /* Reset the keyboard only if we detect any changes. */ - if (nxagentOption(ResetKeyboardAtResume) == 1) + if (nxagentOption(ResetKeyboardAtResume)) { if (nxagentKeyboard == NULL || nxagentOldKeyboard == NULL || strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 || @@ -598,7 +598,7 @@ Bool nxagentReconnectSession(void) if (nxagentResetKeyboard() == 0) { #ifdef WARNING - if (nxagentVerbose == 1) + if (nxagentVerbose) { fprintf(stderr, "%s: Failed to reset keyboard device.\n", __func__); } @@ -616,7 +616,7 @@ Bool nxagentReconnectSession(void) } } - nxagentXkbState.Initialized = 0; + nxagentXkbState.Initialized = False; SAFE_free(nxagentOldKeyboard); @@ -630,7 +630,7 @@ Bool nxagentReconnectSession(void) nxagentRedirectDefaultWindows(); - if (nxagentResizeDesktopAtStartup || nxagentOption(Rootless) == True || nxagentOption(Xinerama) == True) + if (nxagentResizeDesktopAtStartup || nxagentOption(Rootless) || nxagentOption(Xinerama)) { nxagentChangeScreenConfig(0, nxagentOption(RootWidth), nxagentOption(RootHeight), True); @@ -699,7 +699,7 @@ nxagentReconnectError: if (*nxagentGetReconnectError() == '\0') { #ifdef WARNING - if (nxagentVerbose == 1) + if (nxagentVerbose) { fprintf(stderr, "nxagentReconnectSession: WARNING! The reconnect error message is not set. Failed step is [%d].\n", failedStep); |