Skip to content
Snippets Groups Projects
Commit df7b8366 authored by Timur Pocheptsov's avatar Timur Pocheptsov
Browse files

Do not create a pixmap if a context creation failed.

parent 9282b12b
Branches
Tags
No related merge requests found
...@@ -150,7 +150,7 @@ static bool CreateSplashscreenWindow() ...@@ -150,7 +150,7 @@ static bool CreateSplashscreenWindow()
const int screen = DefaultScreen(gDisplay); const int screen = DefaultScreen(gDisplay);
gBackground = WhitePixel(gDisplay, screen); gBackground = WhitePixel(gDisplay, screen);
Pixel foreground = BlackPixel(gDisplay, screen); const Pixel foreground = BlackPixel(gDisplay, screen);
gLogoWindow = XCreateSimpleWindow(gDisplay, DefaultRootWindow(gDisplay), gLogoWindow = XCreateSimpleWindow(gDisplay, DefaultRootWindow(gDisplay),
-100, -100, 50, 50, 0, -100, -100, 50, 50, 0,
...@@ -172,8 +172,7 @@ static void SetSplashscreenPosition() ...@@ -172,8 +172,7 @@ static void SetSplashscreenPosition()
&gWidth, &gHeight, &borderWidth, &depth); &gWidth, &gHeight, &borderWidth, &depth);
//TODO: this is wrong with multi-head display setup! //TODO: this is wrong with multi-head display setup!
Screen * const screen = XDefaultScreenOfDisplay(gDisplay); if (Screen * const screen = XDefaultScreenOfDisplay(gDisplay)) {
if (screen) {
x = (WidthOfScreen(screen) - gWidth) / 2; x = (WidthOfScreen(screen) - gWidth) / 2;
y = (HeightOfScreen(screen) - gHeight) / 2; y = (HeightOfScreen(screen) - gHeight) / 2;
} else { } else {
...@@ -337,7 +336,6 @@ static bool GetRootLogoAndShapeMask() ...@@ -337,7 +336,6 @@ static bool GetRootLogoAndShapeMask()
gHasShapeExt = false; gHasShapeExt = false;
int eventBase = 0, errorBase = 0; int eventBase = 0, errorBase = 0;
gHasShapeExt = XShapeQueryExtension(gDisplay, &eventBase, &errorBase); gHasShapeExt = XShapeQueryExtension(gDisplay, &eventBase, &errorBase);
gLogoPixmap = 0; gLogoPixmap = 0;
...@@ -613,8 +611,9 @@ void PopupLogo(bool about) ...@@ -613,8 +611,9 @@ void PopupLogo(bool about)
if (gAbout) if (gAbout)
ReadContributors(); ReadContributors();
if (gGC)
CreateTextPixmap();
CreateTextPixmap();
if (gCreditsPixmap) if (gCreditsPixmap)
ScrollCredits(0); ScrollCredits(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment