[nautilus] canvas-item: don't use the root window to create drag surface
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] canvas-item: don't use the root window to create drag surface
- Date: Thu, 21 Feb 2013 03:56:08 +0000 (UTC)
commit 1019cdd0668a3fc67531187671ac39fce6b1f025
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Feb 20 22:54:27 2013 -0500
canvas-item: don't use the root window to create drag surface
There's no reason to.
libnautilus-private/nautilus-canvas-item.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/libnautilus-private/nautilus-canvas-item.c b/libnautilus-private/nautilus-canvas-item.c
index 0f4a312..9747349 100644
--- a/libnautilus-private/nautilus-canvas-item.c
+++ b/libnautilus-private/nautilus-canvas-item.c
@@ -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),
- CAIRO_CONTENT_COLOR_ALPHA,
- width, height);
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ width, height);
cr = cairo_create (surface);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]