From 3c33e5cda7f356f47dffc717a900591820ef207c Mon Sep 17 00:00:00 2001 From: monsta Date: Wed, 28 Sep 2016 15:15:56 +0300 Subject: window picker: fix invisible icons in GTK+3 build fixes https://github.com/mate-desktop/mate-netbook/issues/26 --- mate-window-picker-applet/task-item.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mate-window-picker-applet/task-item.c b/mate-window-picker-applet/task-item.c index 7c4c7c8..2096aa4 100644 --- a/mate-window-picker-applet/task-item.c +++ b/mate-window-picker-applet/task-item.c @@ -279,15 +279,13 @@ task_item_sized_pixbuf_for_window (TaskItem *item, static gboolean #if GTK_CHECK_VERSION (3, 0, 0) task_item_draw (GtkWidget *widget, - cairo_t *cr) + cairo_t *unused) #else task_item_expose_event (GtkWidget *widget, GdkEventExpose *event) #endif { -#if !GTK_CHECK_VERSION (3, 0, 0) cairo_t *cr; -#endif TaskItem *item; GdkRectangle area; TaskItemPrivate *priv; @@ -305,7 +303,9 @@ task_item_expose_event (GtkWidget *widget, g_return_val_if_fail (WNCK_IS_WINDOW (priv->window), FALSE); area = priv->area; -#if !GTK_CHECK_VERSION (3, 0, 0) +#if GTK_CHECK_VERSION (3, 0, 0) + cr = gdk_cairo_create (gtk_widget_get_window (widget)); +#else cr = gdk_cairo_create (event->window); #endif @@ -413,9 +413,7 @@ task_item_expose_event (GtkWidget *widget, cairo_paint_with_alpha (cr, .65); } -#if !GTK_CHECK_VERSION (3, 0, 0) cairo_destroy (cr); -#endif return FALSE; } -- cgit v1.2.1