aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorMihai Moldovan <ïonic@ionic.de>2016-07-09 03:28:27 +0000
committerMihai Moldovan <ïonic@ionic.de>2016-07-28 03:26:00 +0000
commite61c8c85cc11dad063da23fb2f1d031c574166f5 (patch)
tree0f22ed1351cd97bac13975e5ab5a46520d6b4a8b /nx-X11/programs
parent6618271493f86109103a2ade74912d34172ba569 (diff)
downloadnx-libs-e61c8c85cc11dad063da23fb2f1d031c574166f5.tar.gz
nx-libs-e61c8c85cc11dad063da23fb2f1d031c574166f5.tar.bz2
nx-libs-e61c8c85cc11dad063da23fb2f1d031c574166f5.zip
nx-X11/programs/Xserver/hw/nxagent/Display.c: split up nxagentCheckForPixmapFormatsCompatibility() and nxagentInitPixmapFormats().
Don't implicitly call the checking function in the init function (and throw away the checking functions result...) Instead, explicitly use the checking function after the init function in other parts of the code and throw away the checking functions return value selectively or actually use it while reconnecting. This is totally different behavior compared to the original one. Hopefully it doesn't cause any problems (i.e., hopefully there was no good reason for never using the checking functions return value, but an oversight.)
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 382cdf3c1..1cd3c25d9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -1347,6 +1347,7 @@ FIXME: Use of nxagentParentWindow is strongly deprecated.
nxagentInitDepths();
nxagentInitPixmapFormats();
+ (void) nxagentCheckForPixmapFormatsCompatibility();
/*
* Create a pixmap for each depth matching the
@@ -1727,8 +1728,6 @@ XXX: Some X server doesn't list 1 among available depths...
}
}
#endif
-
- nxagentCheckForPixmapFormatsCompatibility();
}
void nxagentSetDefaultDrawables()
@@ -2838,11 +2837,16 @@ Bool nxagentReconnectDisplay(void *p0)
* formats are supported.
*/
- /*
- * FIXME: add an actual check here (and pass check value through nxagentInitPixmapFormats().)
- */
nxagentInitPixmapFormats();
+ if (nxagentCheckForPixmapFormatsCompatibility() == 0)
+ {
+ nxagentSetReconnectError(FAILED_RESUME_PIXMAPS_ALERT,
+ "Couldn't restore all the required pixmap formats.");
+
+ return False;
+ }
+
reconnectDisplayState = GOT_PIXMAP_FORMAT_LIST;
/*