summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2015-11-12 09:51:24 +0000
committerMartin Wimpress <[email protected]>2015-11-12 09:51:24 +0000
commitaeff3a713de091c28e892e5a2f304d14f44632c6 (patch)
tree5909d06dbb773204105ef9bfc6d10c3b354e0fc7
parent1e4d522036ca7ed7d7a31fcb9f39d585cd1c0d54 (diff)
parentad3464d2e9c0da6d9cfd5e153fa68e722b8810c5 (diff)
downloadmate-panel-aeff3a713de091c28e892e5a2f304d14f44632c6.tar.bz2
mate-panel-aeff3a713de091c28e892e5a2f304d14f44632c6.tar.xz
Merge pull request #371 from mate-desktop/launcher-fix
don't destroy a widget in its draw/expose signal
-rw-r--r--mate-panel/xstuff.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mate-panel/xstuff.c b/mate-panel/xstuff.c
index 898bcb6f..42dc3b78 100644
--- a/mate-panel/xstuff.c
+++ b/mate-panel/xstuff.c
@@ -310,6 +310,14 @@ zoom_timeout (GtkWidget *window)
}
static gboolean
+idle_destroy (gpointer data)
+{
+ gtk_widget_destroy (GTK_WIDGET (data));
+
+ return FALSE;
+}
+
+static gboolean
#if GTK_CHECK_VERSION (3, 0, 0)
zoom_draw (GtkWidget *widget,
cairo_t *cr,
@@ -328,12 +336,13 @@ zoom_expose (GtkWidget *widget,
g_source_remove (zoom->timeout_id);
zoom->timeout_id = 0;
+ gtk_widget_hide (widget);
+ g_idle_add (idle_destroy, widget);
+
g_object_unref (zoom->pixbuf);
zoom->pixbuf = NULL;
g_slice_free (CompositedZoomData, zoom);
-
- gtk_widget_destroy (widget);
} else {
GdkPixbuf *scaled;
int width, height;