diff options
author | Benjamin Otte <otte@redhat.com> | 2010-07-17 04:41:58 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-07-26 16:42:47 +0200 |
commit | 7f1801eae10b67fb8878eb562ed3614514b96097 (patch) | |
tree | 7001b3d6c5a804dd35d268479154b5f3589ff5c2 /modules/input | |
parent | c122d31c295df20d10a3729ba4fcaac093b85d22 (diff) | |
download | gtk+-7f1801eae10b67fb8878eb562ed3614514b96097.tar.gz |
imcontextxim: Draw with Cairo
Diffstat (limited to 'modules/input')
-rw-r--r-- | 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 dfa17bc9b7..b322a5ff22 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; } |