From 370982b812ff7d253d0ed175f8b5fb90d974ea9f Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 18 Oct 2002 06:05:09 +0000 Subject: replace the old apply_constraints with wacky new approach involving 2002-10-18 Havoc Pennington * src/stack.c (constrain_stacking): replace the old apply_constraints with wacky new approach involving graphing all the constraints then walking the graph. Fixes #94876 and probably other stacking bugs as well, thanks to Arvind for tracking down the issue. (compute_layer): add FIXME and reference to bug #96140 --- src/tools/metacity-window-demo.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'src/tools') diff --git a/src/tools/metacity-window-demo.c b/src/tools/metacity-window-demo.c index 0102fbeca..215ab6d00 100644 --- a/src/tools/metacity-window-demo.c +++ b/src/tools/metacity-window-demo.c @@ -227,11 +227,12 @@ make_dialog (GtkWidget *parent, GtkWidget *dialog; char *str; - dialog = gtk_message_dialog_new (GTK_WINDOW (parent), + dialog = gtk_message_dialog_new (parent ? GTK_WINDOW (parent) : NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, - "Here is a dialog %d", + parent ? "Here is a dialog %d" : + "Here is a dialog %d with no transient parent", depth); str = g_strdup_printf ("%d dialog", depth); @@ -306,21 +307,7 @@ no_parent_dialog_cb (gpointer callback_data, guint callback_action, GtkWidget *widget) { - GtkWidget *dialog; - - dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, - "Here is a dialog with no transient parent"); - - /* Close dialog on user response */ - g_signal_connect (G_OBJECT (dialog), - "response", - G_CALLBACK (gtk_widget_destroy), - NULL); - - gtk_widget_show (dialog); + make_dialog (NULL, 1); } static void -- cgit v1.2.1