summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-09-28 15:15:56 +0300
committermonsta <[email protected]>2016-09-28 15:15:56 +0300
commit3c33e5cda7f356f47dffc717a900591820ef207c (patch)
treed47454d29da2aa604e7919b218bfb4b2132947af
parent359dca5356bc9c17976788352a746bd489eed5f3 (diff)
downloadmate-netbook-3c33e5cda7f356f47dffc717a900591820ef207c.tar.bz2
mate-netbook-3c33e5cda7f356f47dffc717a900591820ef207c.tar.xz
window picker: fix invisible icons in GTK+3 build
fixes https://github.com/mate-desktop/mate-netbook/issues/26
-rw-r--r--mate-window-picker-applet/task-item.c10
1 files 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;
}