[gtk/path-work-rebased: 929/1045] gtk-demo: Small fixup to the cursors demo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/path-work-rebased: 929/1045] gtk-demo: Small fixup to the cursors demo
- Date: Thu, 7 Apr 2022 19:09:23 +0000 (UTC)
commit 9e6447f2a6e2859ebfd0ca9f78247ce13f19ae36
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 4 22:16:01 2021 -0500
gtk-demo: Small fixup to the cursors demo
demos/gtk-demo/cursors.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/cursors.c b/demos/gtk-demo/cursors.c
index d1ea0314e5..31d935d813 100644
--- a/demos/gtk-demo/cursors.c
+++ b/demos/gtk-demo/cursors.c
@@ -24,6 +24,7 @@ do_cursors (GtkWidget *do_widget)
builder = gtk_builder_new_from_resource ("/cursors/cursors.ui");
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
+ g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget));
g_signal_connect (window, "destroy",
@@ -34,9 +35,7 @@ do_cursors (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- {
- gtk_window_destroy (GTK_WINDOW (window));
- }
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]