]> Pileus Git - ~andy/gtk/commitdiff
imcontextxim: Draw with Cairo
authorBenjamin Otte <otte@redhat.com>
Sat, 17 Jul 2010 02:41:58 +0000 (04:41 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 26 Jul 2010 14:42:47 +0000 (16:42 +0200)
modules/input/gtkimcontextxim.c

index dfa17bc9b747929f508280403f5682940b2e72bc..b322a5ff22a2a5a9582bd4a3bca528de7d9223a5 100644 (file)
@@ -1772,16 +1772,21 @@ static gboolean
 on_status_window_expose_event (GtkWidget      *widget,
                               GdkEventExpose *event)
 {
-  gdk_draw_rectangle (widget->window,
-                     widget->style->base_gc [GTK_STATE_NORMAL],
-                     TRUE,
-                     0, 0,
-                     widget->allocation.width, widget->allocation.height);
-  gdk_draw_rectangle (widget->window,
-                     widget->style->text_gc [GTK_STATE_NORMAL],
-                     FALSE,
-                     0, 0,
-                     widget->allocation.width - 1, widget->allocation.height - 1);
+  cairo_t *cr;
+
+  cr = gdk_cairo_create (widget->window);
+
+  gdk_cairo_set_source_color (cr, &widget->style->base[GTK_STATE_NORMAL]);
+  cairo_rectangle (cr,
+                   0, 0,
+                   widget->allocation.width, widget->allocation.height);
+  cairo_fill (cr);
+
+  gdk_cairo_set_source_color (cr, &widget->style->text[GTK_STATE_NORMAL]);
+  cairo_rectangle (cr, 
+                   0, 0,
+                   widget->allocation.width - 1, widget->allocation.height - 1);
+  cairo_fill (cr);
 
   return FALSE;
 }