]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkpixmap.c
gdk: Create solid mask with Cairo
[~andy/gtk] / gdk / gdkpixmap.c
index 06ae850caac1d31eca37b220b961f659ab54a91e..a6a68e81a60ff48749e31fa37d6ec215ac9d3e65 100644 (file)
@@ -555,18 +555,14 @@ static GdkBitmap *
 make_solid_mask (GdkScreen *screen, gint width, gint height)
 {
   GdkBitmap *bitmap;
-  GdkGC *gc;
-  GdkGCValues gc_values;
+  cairo_t *cr;
   
   bitmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
                           width, height, 1);
 
-  gc_values.foreground.pixel = 1;
-  gc = gdk_gc_new_with_values (bitmap, &gc_values, GDK_GC_FOREGROUND);
-  
-  gdk_draw_rectangle (bitmap, gc, TRUE, 0, 0, width, height);
-  
-  g_object_unref (gc);
+  cr = gdk_cairo_create (bitmap);
+  cairo_paint (cr);
+  cairo_destroy (cr);
   
   return bitmap;
 }