[gtk+/rendering-cleanup: 92/95] x11: Create empty cursor without old functions



commit b9264f0da3a656b46a816f27e98ef43f62b40840
Author: Benjamin Otte <otte redhat com>
Date:   Fri Aug 6 22:41:21 2010 +0200

    x11: Create empty cursor without old functions
    
    In particular, clear the bitmap manually instead of using
    create_from_data.

 gdk/x11/gdkcursor-x11.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index a9373f6..ca3c05f 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -161,10 +161,15 @@ get_blank_cursor (GdkDisplay *display)
   Pixmap source_pixmap;
   XColor color;
   Cursor cursor;
+  cairo_t *cr;
 
   screen = gdk_display_get_default_screen (display);
-  pixmap = gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen), 
-					"\0\0\0\0\0\0\0\0", 1, 1);
+  pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen), 1, 1, 1);
+  /* Clear Pixmap */
+  cr = gdk_cairo_create (pixmap);
+  cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
+  cairo_paint (cr);
+  cairo_destroy (cr);
  
   source_pixmap = GDK_PIXMAP_XID (pixmap);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]