[Xfce4-commits] [xfce/xfce4-settings] 24/27: Add destroy callback to always free the pixbuf
noreply at xfce.org
noreply at xfce.org
Sun Feb 25 23:56:33 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 2
in repository xfce/xfce4-settings.
commit 91a91862685b725b821d0655f13e1e8d4214c7a0
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Feb 25 23:41:48 2018 +0100
Add destroy callback to always free the pixbuf
---
dialogs/accessibility-settings/find-cursor.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dialogs/accessibility-settings/find-cursor.c b/dialogs/accessibility-settings/find-cursor.c
index a7be008..4f2016c 100644
--- a/dialogs/accessibility-settings/find-cursor.c
+++ b/dialogs/accessibility-settings/find-cursor.c
@@ -112,6 +112,16 @@ find_cursor_window_composited (GtkWidget *widget) {
+static void
+find_cursor_window_destroy (GtkWidget *widget,
+ gpointer user_data) {
+ if (pixbuf)
+ g_object_unref (pixbuf);
+ gtk_main_quit ();
+}
+
+
+
static gboolean
find_cursor_window_expose (GtkWidget *widget,
GdkEventExpose *event,
@@ -166,9 +176,7 @@ find_cursor_window_expose (GtkWidget *widget,
/* stop before the circles get bigger than the window */
if (px >= CIRCLE_RADIUS) {
- if (pixbuf)
- g_object_unref (pixbuf);
- gtk_main_quit ();
+ find_cursor_window_destroy (widget, NULL);
}
px += 3;
@@ -247,7 +255,7 @@ main (gint argc, gchar **argv)
g_signal_connect (G_OBJECT (window), "expose-event",
G_CALLBACK (find_cursor_window_expose), GINT_TO_POINTER (composited));
g_signal_connect (G_OBJECT (window), "destroy",
- G_CALLBACK (gtk_main_quit), NULL);
+ G_CALLBACK (find_cursor_window_destroy), NULL);
gtk_widget_show_all (GTK_WIDGET (window));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list