SurfaceList surfaces = (*current)->getAllSurfaces();
for(SurfaceListConstIterator currentS = surfaces.begin(); currentS != surfaces.end(); currentS++)
{
- allocatePlatformSurface(*currentS);
+ if (currentS->hasNativeContent())
+ {
+ allocatePlatformSurface(*currentS);
+ }
}
}
m_pScene->unlockScene();
if (x11surf->pixmap)
{
int result = XFreePixmap(x11Display, x11surf->pixmap);
- delete surface->platform;
- surface->platform = NULL;
LOG_DEBUG("X11WindowSystem", "XFreePixmap() returned " << result);
}
}
UnMapWindow(window);
LOG_DEBUG("X11WindowSystem", "Remove Native Content from Surface " << surface->getID());
surface->removeNativeContent();
+ delete surface->platform;
+ surface->platform = NULL;
}
}
}
graphicSystem->saveScreenShotOfFramebuffer(screenShotFile);
-// graphicSystem->swapBuffers();
+// graphicSystem->swapBuffers();
takeScreenshot = ScreenShotNone;
LOG_DEBUG("X11WindowSystem", "Done taking screenshot");
void X11WindowSystem::allocatePlatformSurface(Surface* surface)
{
+ LOG_DEBUG("X11WindowSystem","allocatePlatformSurface begin");
XPlatformSurface* nativeSurface = (XPlatformSurface*)surface->platform;
if (!nativeSurface)
{
NewWindow(surface, surface->getNativeContent());
MapWindow(surface->getNativeContent());
}
+ LOG_DEBUG("X11WindowSystem","allocatePlatformSurface end");
}
void X11WindowSystem::doScreenShot(std::string fileName)