XPlatformSurface* x11surf = (XPlatformSurface*)surface->platform;
if (x11surf->isMapped)
{
- LOG_WARNING("X11WindowSystem", "Platform surface already in use ");
+ LOG_WARNING("X11WindowSystem", "Platform surface already mapped");
return;
}
x11surf->isMapped = true;
surface->OriginalSourceHeight = winHeight;
surface->OriginalSourceWidth = winWidth;
+ surface->renderPropertyChanged = true;
graphicSystem->getTextureBinder()->createClientBuffer(surface);
XSync(x11Display, 0);
LOG_WARNING("X11WindowSystem", "Platform surface not available for window " << window);
return;
}
- XPlatformSurface* x11surf = (XPlatformSurface*)surface->platform;
+ XPlatformSurface* x11surf = (XPlatformSurface*)surface->platform;
LOG_DEBUG("X11WindowSystem", "Unmapping surface " << surface->getID());
+ if (!x11surf->isMapped)
+ {
+ LOG_WARNING("X11WindowSystem", "Platform surface already unmapped");
+ return;
+ }
x11surf->isMapped = false;
int result = XFreePixmap(x11Display, x11surf->pixmap);
LOG_DEBUG("X11WindowSystem", "XFreePixmap() returned " << result);
}
+
+ surface->renderPropertyChanged = true;
}
LOG_DEBUG("X11WindowSystem", "Unmap finished");
}
LOG_DEBUG("X11WindowSystem", "Remove Native Content from Surface " << surface->getID());
surface->removeNativeContent();
delete surface->platform;
- surface->platform = NULL;
- surface->renderPropertyChanged = true;
+ surface->platform = NULL;
}
}