Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
99ca67c2
You need to sign in or sign up before continuing.
Commit
99ca67c2
authored
Dec 31, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: improve Boolean handling for Reconnect functions
parent
6c09c0b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
Display.c
nx-X11/programs/Xserver/hw/nxagent/Display.c
+7
-7
Reconnect.c
nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+13
-13
No files found.
nx-X11/programs/Xserver/hw/nxagent/Display.c
View file @
99ca67c2
...
@@ -2517,7 +2517,7 @@ Bool nxagentReconnectDisplay(void *p0)
...
@@ -2517,7 +2517,7 @@ Bool nxagentReconnectDisplay(void *p0)
nxagentSetReconnectError
(
FAILED_RESUME_DISPLAY_ALERT
,
nxagentSetReconnectError
(
FAILED_RESUME_DISPLAY_ALERT
,
"Couldn't open the display."
);
"Couldn't open the display."
);
return
F
ALSE
;
return
F
alse
;
}
}
nxagentAddXConnection
();
nxagentAddXConnection
();
...
@@ -2535,12 +2535,12 @@ Bool nxagentReconnectDisplay(void *p0)
...
@@ -2535,12 +2535,12 @@ Bool nxagentReconnectDisplay(void *p0)
#endif
#endif
if
(
nxagentCheckForDefaultDepthCompatibility
()
==
0
)
if
(
!
nxagentCheckForDefaultDepthCompatibility
()
)
{
{
nxagentSetReconnectError
(
FAILED_RESUME_DISPLAY_ALERT
,
nxagentSetReconnectError
(
FAILED_RESUME_DISPLAY_ALERT
,
"Default display depth doesn't match."
);
"Default display depth doesn't match."
);
return
F
ALSE
;
return
F
alse
;
}
}
nxagentUseNXTrans
=
nxagentPostProcessArgs
(
nxagentDisplayName
,
nxagentDisplay
,
nxagentUseNXTrans
=
nxagentPostProcessArgs
(
nxagentDisplayName
,
nxagentDisplay
,
...
@@ -2557,12 +2557,12 @@ Bool nxagentReconnectDisplay(void *p0)
...
@@ -2557,12 +2557,12 @@ Bool nxagentReconnectDisplay(void *p0)
* Init and compare the visuals.
* Init and compare the visuals.
*/
*/
if
(
nxagentInitAndCheckVisuals
(
flexibility
)
==
FALSE
)
if
(
!
nxagentInitAndCheckVisuals
(
flexibility
)
)
{
{
nxagentSetReconnectError
(
FAILED_RESUME_VISUALS_ALERT
,
nxagentSetReconnectError
(
FAILED_RESUME_VISUALS_ALERT
,
"Couldn't restore the required visuals."
);
"Couldn't restore the required visuals."
);
return
F
ALSE
;
return
F
alse
;
}
}
reconnectDisplayState
=
GOT_VISUAL_INFO
;
reconnectDisplayState
=
GOT_VISUAL_INFO
;
...
@@ -2612,7 +2612,7 @@ Bool nxagentReconnectDisplay(void *p0)
...
@@ -2612,7 +2612,7 @@ Bool nxagentReconnectDisplay(void *p0)
reconnectDisplayState
=
GOT_DEPTH_LIST
;
reconnectDisplayState
=
GOT_DEPTH_LIST
;
if
(
nxagentCheckForDepthsCompatibility
()
==
0
)
if
(
!
nxagentCheckForDepthsCompatibility
()
)
{
{
nxagentSetReconnectError
(
FAILED_RESUME_DEPTHS_ALERT
,
nxagentSetReconnectError
(
FAILED_RESUME_DEPTHS_ALERT
,
"Couldn't restore all the required depths."
);
"Couldn't restore all the required depths."
);
...
@@ -2634,7 +2634,7 @@ Bool nxagentReconnectDisplay(void *p0)
...
@@ -2634,7 +2634,7 @@ Bool nxagentReconnectDisplay(void *p0)
nxagentInitPixmapFormats
();
nxagentInitPixmapFormats
();
if
(
nxagentCheckForPixmapFormatsCompatibility
()
==
0
)
if
(
!
nxagentCheckForPixmapFormatsCompatibility
()
)
{
{
nxagentSetReconnectError
(
FAILED_RESUME_PIXMAPS_ALERT
,
nxagentSetReconnectError
(
FAILED_RESUME_PIXMAPS_ALERT
,
"Couldn't restore all the required pixmap formats."
);
"Couldn't restore all the required pixmap formats."
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
View file @
99ca67c2
...
@@ -458,7 +458,7 @@ Bool nxagentReconnectSession(void)
...
@@ -458,7 +458,7 @@ Bool nxagentReconnectSession(void)
nxagentProcessOptions
(
nxagentOptionsFilenameOrString
);
nxagentProcessOptions
(
nxagentOptionsFilenameOrString
);
if
(
nxagentReconnectDisplay
(
reconnectLossyLevel
[
DISPLAY_STEP
])
==
0
)
if
(
!
nxagentReconnectDisplay
(
reconnectLossyLevel
[
DISPLAY_STEP
])
)
{
{
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentReconnectSession: WARNING! Failed display reconnection.
\n
"
);
fprintf
(
stderr
,
"nxagentReconnectSession: WARNING! Failed display reconnection.
\n
"
);
...
@@ -468,7 +468,7 @@ Bool nxagentReconnectSession(void)
...
@@ -468,7 +468,7 @@ Bool nxagentReconnectSession(void)
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
if
(
nxagentReconnectScreen
(
reconnectLossyLevel
[
SCREEN_STEP
])
==
0
)
if
(
!
nxagentReconnectScreen
(
reconnectLossyLevel
[
SCREEN_STEP
])
)
{
{
failedStep
=
SCREEN_STEP
;
failedStep
=
SCREEN_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
...
@@ -478,9 +478,9 @@ Bool nxagentReconnectSession(void)
...
@@ -478,9 +478,9 @@ Bool nxagentReconnectSession(void)
nxagentListRemoteFonts
(
"*"
,
nxagentMaxFontNames
);
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
;
failedStep
=
FONT_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
...
@@ -515,26 +515,26 @@ Bool nxagentReconnectSession(void)
...
@@ -515,26 +515,26 @@ Bool nxagentReconnectSession(void)
nxagentEmptyBSPixmapList
();
nxagentEmptyBSPixmapList
();
/* FIXME: nxagentReconnectAllPixmaps will always return 1 */
/* FIXME: nxagentReconnectAllPixmaps will always return 1 */
if
(
nxagentReconnectAllPixmaps
(
reconnectLossyLevel
[
PIXMAP_STEP
])
==
0
)
if
(
!
nxagentReconnectAllPixmaps
(
reconnectLossyLevel
[
PIXMAP_STEP
])
)
{
{
failedStep
=
PIXMAP_STEP
;
failedStep
=
PIXMAP_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
if
(
nxagentReconnectAllGCs
(
reconnectLossyLevel
[
GC_STEP
])
==
0
)
if
(
!
nxagentReconnectAllGCs
(
reconnectLossyLevel
[
GC_STEP
])
)
{
{
failedStep
=
GC_STEP
;
failedStep
=
GC_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
if
(
nxagentReconnectAllColormap
(
reconnectLossyLevel
[
COLORMAP_STEP
])
==
0
)
if
(
!
nxagentReconnectAllColormap
(
reconnectLossyLevel
[
COLORMAP_STEP
])
)
{
{
failedStep
=
COLORMAP_STEP
;
failedStep
=
COLORMAP_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
if
(
nxagentReconnectAllWindows
(
reconnectLossyLevel
[
WINDOW_STEP
])
==
0
)
if
(
!
nxagentReconnectAllWindows
(
reconnectLossyLevel
[
WINDOW_STEP
])
)
{
{
failedStep
=
WINDOW_STEP
;
failedStep
=
WINDOW_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
...
@@ -542,32 +542,32 @@ Bool nxagentReconnectSession(void)
...
@@ -542,32 +542,32 @@ Bool nxagentReconnectSession(void)
if
(
nxagentRenderEnable
)
if
(
nxagentRenderEnable
)
{
{
if
(
nxagentReconnectAllGlyphSet
(
reconnectLossyLevel
[
GLYPHSET_STEP
])
==
0
)
if
(
!
nxagentReconnectAllGlyphSet
(
reconnectLossyLevel
[
GLYPHSET_STEP
])
)
{
{
failedStep
=
GLYPHSET_STEP
;
failedStep
=
GLYPHSET_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
if
(
nxagentReconnectAllPictFormat
(
reconnectLossyLevel
[
PICTFORMAT_STEP
])
==
0
)
if
(
!
nxagentReconnectAllPictFormat
(
reconnectLossyLevel
[
PICTFORMAT_STEP
])
)
{
{
failedStep
=
PICTFORMAT_STEP
;
failedStep
=
PICTFORMAT_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
if
(
nxagentReconnectAllPicture
(
reconnectLossyLevel
[
PICTURE_STEP
])
==
0
)
if
(
!
nxagentReconnectAllPicture
(
reconnectLossyLevel
[
PICTURE_STEP
])
)
{
{
failedStep
=
PICTURE_STEP
;
failedStep
=
PICTURE_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
}
}
if
(
nxagentReconnectAllCursor
(
reconnectLossyLevel
[
CURSOR_STEP
])
==
0
)
if
(
!
nxagentReconnectAllCursor
(
reconnectLossyLevel
[
CURSOR_STEP
])
)
{
{
failedStep
=
CURSOR_STEP
;
failedStep
=
CURSOR_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
}
}
if
(
nxagentSetWindowCursors
(
reconnectLossyLevel
[
WINDOW_STEP
])
==
0
)
if
(
!
nxagentSetWindowCursors
(
reconnectLossyLevel
[
WINDOW_STEP
])
)
{
{
failedStep
=
WINDOW_STEP
;
failedStep
=
WINDOW_STEP
;
goto
nxagentReconnectError
;
goto
nxagentReconnectError
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment