Revert "root: Make sure cairo doesn't cache our temporary connection" (FS#1245)

This reverts commit c1cb7883b5.

The cairo surface used for uploading the wallpaper doesn't use a temporary
connection but is on our main connection since commit 5024843e9. Thus, the above
commit broke all of our cairo drawing instead of just making cairo not touch our
temporary connection.
This commit is contained in:
Uli Schlachter 2014-04-01 16:15:44 +02:00
parent 9f5ee6b864
commit eef2045954
1 changed files with 0 additions and 5 deletions

5
root.c
View File

@ -77,7 +77,6 @@ root_set_wallpaper(cairo_pattern_t *pattern)
uint16_t height = screen->height_in_pixels; uint16_t height = screen->height_in_pixels;
bool result = false; bool result = false;
cairo_surface_t *surface; cairo_surface_t *surface;
cairo_device_t *device;
cairo_t *cr; cairo_t *cr;
if (xcb_connection_has_error(c)) if (xcb_connection_has_error(c))
@ -95,7 +94,6 @@ root_set_wallpaper(cairo_pattern_t *pattern)
* the new one directly and doesn't need GetImage and PutImage. * the new one directly and doesn't need GetImage and PutImage.
*/ */
surface = cairo_xcb_surface_create(globalconf.connection, p, draw_default_visual(screen), width, height); surface = cairo_xcb_surface_create(globalconf.connection, p, draw_default_visual(screen), width, height);
device = cairo_device_reference(cairo_surface_get_device(surface));
cr = cairo_create(surface); cr = cairo_create(surface);
/* Paint the pattern to the surface */ /* Paint the pattern to the surface */
cairo_set_source(cr, pattern); cairo_set_source(cr, pattern);
@ -104,9 +102,6 @@ root_set_wallpaper(cairo_pattern_t *pattern)
cairo_destroy(cr); cairo_destroy(cr);
cairo_surface_finish(surface); cairo_surface_finish(surface);
cairo_surface_destroy(surface); cairo_surface_destroy(surface);
/* Finish the device so we safely call xcb_disconnect() */
cairo_device_finish(device);
cairo_device_destroy(device);
xcb_aux_sync(globalconf.connection); xcb_aux_sync(globalconf.connection);
root_set_wallpaper_pixmap(c, p); root_set_wallpaper_pixmap(c, p);