Commit e61c8c85 authored by Mihai Moldovan's avatar Mihai Moldovan

nx-X11/programs/Xserver/hw/nxagent/Display.c: split up…

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.)
parent 66182714
......@@ -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;
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment