- glDeleteTextures(1, &screen->windows[i].texture);
- if(!destroyed)
- {
- XDamageDestroy(compositor->display, screen->windows[i].damage);
- if(screen->windows[i].pixmap)
- {
- glXDestroyPixmap(compositor->display, screen->windows[i].glx_pixmap);
- XFreePixmap(compositor->display, screen->windows[i].pixmap);
- }
- XCompositeUnredirectWindow(compositor->display, screen->windows[i].window, CompositeRedirectManual);
- }
-
- --screen->nwindows;
- for(; i<screen->nwindows; ++i)
- screen->windows[i] = screen->windows[i+1];
+ glXDestroyPixmap(compositor->display, window->glx_pixmap);
+ XFreePixmap(compositor->display, window->pixmap);