window->recreate_mask = (window->map_state==IsViewable);
XShapeSelectInput(compositor->display, window->window, ShapeNotifyMask);
window->recreate_mask = (window->map_state==IsViewable);
XShapeSelectInput(compositor->display, window->window, ShapeNotifyMask);
+ Window root;
+ int x, y;
+ unsigned width;
+ unsigned height;
+ unsigned border;
+ unsigned depth;
+
+ use_gl(compositor, screen);
+
+ if(screen->root_glx_pixmap)
+ {
+ glXDestroyPixmap(compositor->display, screen->root_glx_pixmap);
+ screen->root_glx_pixmap = 0;
+ }
XGetWindowProperty(compositor->display, screen->root, compositor->root_pmap_atom, 0, 1, False, XA_PIXMAP,
&prop_type, &prop_format, &length, &overflow, (unsigned char **)&pixmap);
if(prop_type!=XA_PIXMAP || prop_format!=32)
{
screen->root_pixmap = 0;
XGetWindowProperty(compositor->display, screen->root, compositor->root_pmap_atom, 0, 1, False, XA_PIXMAP,
&prop_type, &prop_format, &length, &overflow, (unsigned char **)&pixmap);
if(prop_type!=XA_PIXMAP || prop_format!=32)
{
screen->root_pixmap = 0;
- screen->root_glx_pixmap = pixmap_to_glx_pixmap(compositor, screen, screen->root_pixmap);
+ if(XGetGeometry(compositor->display, screen->root_pixmap, &root, &x, &y, &width, &height, &border, &depth))
+ screen->root_glx_pixmap = pixmap_to_glx_pixmap(compositor, screen, screen->root_pixmap);
+ else
+ screen->root_pixmap = None;
update_geometry_correction(compositor, screen);
update_root_pixmap(compositor, screen);
update_geometry_correction(compositor, screen);
update_root_pixmap(compositor, screen);
glDeleteBuffers(1, &screen->window_vertex_buffer);
glDeleteVertexArrays(1, &screen->window_vertex_array);
glDeleteFramebuffers(1, &screen->framebuffer);
glDeleteBuffers(1, &screen->window_vertex_buffer);
glDeleteVertexArrays(1, &screen->window_vertex_array);
glDeleteFramebuffers(1, &screen->framebuffer);
- update_geometry_correction(compositor, screen);
+ if(event->atom==compositor->correction_atom)
+ update_geometry_correction(compositor, screen);
+ else if(event->atom==compositor->root_pmap_atom)
+ update_root_pixmap(compositor, screen);