[gtk+/rendering-cleanup: 88/113] imcontextxim: Draw with Cairo



commit 09c72ae40f13271677c0de1f75a6771b86e1ebd1
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jul 17 04:41:58 2010 +0200

    imcontextxim: Draw with Cairo

 modules/input/gtkimcontextxim.c |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/modules/input/gtkimcontextxim.c b/modules/input/gtkimcontextxim.c
index baf1a97..57b122d 100644
--- a/modules/input/gtkimcontextxim.c
+++ b/modules/input/gtkimcontextxim.c
@@ -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;
 }



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