x11: Create empty cursor without old functions

In particular, clear the bitmap manually instead of using
create_from_data.
This commit is contained in:
Benjamin Otte
2010-08-06 22:41:21 +02:00
parent aaf70d1327
commit 4f37e6833c

View File

@ -161,10 +161,15 @@ get_blank_cursor (GdkDisplay *display)
Pixmap source_pixmap; Pixmap source_pixmap;
XColor color; XColor color;
Cursor cursor; Cursor cursor;
cairo_t *cr;
screen = gdk_display_get_default_screen (display); screen = gdk_display_get_default_screen (display);
pixmap = gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen), pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen), 1, 1, 1);
"\0\0\0\0\0\0\0\0", 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); source_pixmap = GDK_PIXMAP_XID (pixmap);