Skip to content

Commit

Permalink
window picker: fix invisible icons in GTK+3 build
Browse files Browse the repository at this point in the history
fixes #26
  • Loading branch information
monsta committed Sep 28, 2016
1 parent 359dca5 commit 3c33e5c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions mate-window-picker-applet/task-item.c
Expand Up @@ -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;
Expand All @@ -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

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 3c33e5c

Please sign in to comment.