Commit 1019cdd0 authored by Cosimo Cecchi's avatar Cosimo Cecchi

canvas-item: don't use the root window to create drag surface

There's no reason to.
parent a5928e84
......@@ -433,7 +433,6 @@ nautilus_canvas_item_get_drag_surface (NautilusCanvasItem *item)
cairo_surface_t *surface;
EelCanvas *canvas;
GdkScreen *screen;
int width, height;
int item_offset_x, item_offset_y;
EelIRect icon_rect;
......@@ -444,7 +443,6 @@ nautilus_canvas_item_get_drag_surface (NautilusCanvasItem *item)
g_return_val_if_fail (NAUTILUS_IS_CANVAS_ITEM (item), NULL);
canvas = EEL_CANVAS_ITEM (item)->canvas;
screen = gtk_widget_get_screen (GTK_WIDGET (canvas));
context = gtk_widget_get_style_context (GTK_WIDGET (canvas));
gtk_style_context_save (context);
......@@ -465,9 +463,8 @@ nautilus_canvas_item_get_drag_surface (NautilusCanvasItem *item)
width = EEL_CANVAS_ITEM (item)->x2 - EEL_CANVAS_ITEM (item)->x1;
height = EEL_CANVAS_ITEM (item)->y2 - EEL_CANVAS_ITEM (item)->y1;
surface = gdk_window_create_similar_surface (gdk_screen_get_root_window (screen),
width, height);
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
width, height);
cr = cairo_create (surface);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment