Make kwin not crash under qemu due to failing glx call
This fixes a kwin crash that happened under qemu when running kwin for the first time (subsequent runs had glx already disabled)
This commit is contained in:
parent
24f68febf1
commit
f9109a3d4b
1 changed files with 4 additions and 0 deletions
|
@ -222,6 +222,10 @@ bool GlxBackend::initBuffer()
|
||||||
if (overlayWindow()->create()) {
|
if (overlayWindow()->create()) {
|
||||||
// Try to create double-buffered window in the overlay
|
// Try to create double-buffered window in the overlay
|
||||||
XVisualInfo* visual = glXGetVisualFromFBConfig(display(), fbconfig);
|
XVisualInfo* visual = glXGetVisualFromFBConfig(display(), fbconfig);
|
||||||
|
if (!visual) {
|
||||||
|
kError(1212) << "Failed to get visual from fbconfig";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
XSetWindowAttributes attrs;
|
XSetWindowAttributes attrs;
|
||||||
attrs.colormap = XCreateColormap(display(), rootWindow(), visual->visual, AllocNone);
|
attrs.colormap = XCreateColormap(display(), rootWindow(), visual->visual, AllocNone);
|
||||||
window = XCreateWindow(display(), overlayWindow()->window(), 0, 0, displayWidth(), displayHeight(),
|
window = XCreateWindow(display(), overlayWindow()->window(), 0, 0, displayWidth(), displayHeight(),
|
||||||
|
|
Loading…
Reference in a new issue