summaryrefslogtreecommitdiff
path: root/src/ui/draw-workspace.c
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2010-08-18 03:09:50 +0200
committerThomas Thurman <tthurman@gnome.org>2010-09-15 11:58:29 -0400
commit3608ff90798cbb6c8d88be902abd56f1a4b16bc0 (patch)
tree4ffb446cbf78ea2defea218df7b9837f2509bfd9 /src/ui/draw-workspace.c
parent874f55b645d664925b49ee9972cd82dc39287098 (diff)
downloadmetacity-3608ff90798cbb6c8d88be902abd56f1a4b16bc0.tar.gz
metacity-3608ff90798cbb6c8d88be902abd56f1a4b16bc0.tar.bz2
Replace GDK drawing API with cairo
The GDK drawing API was deprecated/removed. https://bugzilla.gnome.org/show_bug.cgi?id=627245
Diffstat (limited to 'src/ui/draw-workspace.c')
-rw-r--r--src/ui/draw-workspace.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/ui/draw-workspace.c b/src/ui/draw-workspace.c
index 72daf67..9dc491f 100644
--- a/src/ui/draw-workspace.c
+++ b/src/ui/draw-workspace.c
@@ -179,6 +179,7 @@ wnck_draw_workspace (GtkWidget *widget,
int i;
GdkRectangle workspace_rect;
GtkStateType state;
+ cairo_t *cr;
workspace_rect.x = x;
workspace_rect.y = y;
@@ -191,28 +192,22 @@ wnck_draw_workspace (GtkWidget *widget,
state = GTK_STATE_PRELIGHT;
else
state = GTK_STATE_NORMAL;
+
+ cr = gdk_cairo_create (drawable);
if (workspace_background)
{
- gdk_draw_pixbuf (drawable,
- gtk_widget_get_style (GTK_WIDGET (widget))->dark_gc[state],
- workspace_background,
- 0, 0,
- x, y,
- -1, -1,
- GDK_RGB_DITHER_MAX,
- 0, 0);
+ gdk_cairo_set_source_pixbuf (cr, workspace_background, x, y);
+ cairo_paint (cr);
}
else
{
- cairo_t *cr;
-
- cr = gdk_cairo_create (gtk_widget_get_window (widget));
gdk_cairo_set_source_color (cr, &gtk_widget_get_style (widget)->dark[state]);
cairo_rectangle (cr, x, y, width, height);
cairo_fill (cr);
- cairo_destroy (cr);
}
+
+ cairo_destroy (cr);
i = 0;
while (i < n_windows)