summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-08-24 21:49:32 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-08-24 21:49:32 +0000
commitf1b58398b0b21d3a4147363a26565b4c02a9a7c9 (patch)
tree0e453cf5adf6e275e67a38fe188b828828d31ce9 /src
parentcbb4a91113734a5c743183207d76c0901bcbe7cd (diff)
downloadmetacity-f1b58398b0b21d3a4147363a26565b4c02a9a7c9.tar.gz
metacity-f1b58398b0b21d3a4147363a26565b4c02a9a7c9.tar.bz2
recalculate mapped-ness of frame after toggling decorations on/off, so
2002-08-24 Havoc Pennington <hp@redhat.com> * src/window.c (process_property_notify): recalculate mapped-ness of frame after toggling decorations on/off, so that windows don't disappear when decorations are toggled on. * src/tools/metacity-window-demo.c (toggle_decorated_cb): add a test for toggling decoration state on the fly
Diffstat (limited to 'src')
-rw-r--r--src/tools/metacity-window-demo.c19
-rw-r--r--src/window.c2
2 files changed, 21 insertions, 0 deletions
diff --git a/src/tools/metacity-window-demo.c b/src/tools/metacity-window-demo.c
index 6afa569..ca75e2e 100644
--- a/src/tools/metacity-window-demo.c
+++ b/src/tools/metacity-window-demo.c
@@ -635,6 +635,17 @@ sleep_cb (GtkWidget *button,
}
static void
+toggle_decorated_cb (GtkWidget *button,
+ gpointer data)
+{
+ GtkWidget *window;
+ window = gtk_widget_get_ancestor (button, GTK_TYPE_WINDOW);
+ if (window)
+ gtk_window_set_decorated (GTK_WINDOW (window),
+ !gtk_window_get_decorated (GTK_WINDOW (window)));
+}
+
+static void
clicked_toolbar_cb (GtkWidget *button,
gpointer data)
{
@@ -780,6 +791,14 @@ do_appwindow (void)
-1); /* -1 means "append" */
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
+ GTK_STOCK_OPEN,
+ "This is a demo button that toggles window decorations",
+ NULL,
+ G_CALLBACK (toggle_decorated_cb),
+ window, /* user data for callback */
+ -1); /* -1 means "append" */
+
+ gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
GTK_STOCK_QUIT,
"This is a demo button with a 'quit' icon",
NULL,
diff --git a/src/window.c b/src/window.c
index 083adc8..8c3b827 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3794,6 +3794,8 @@ process_property_notify (MetaWindow *window,
meta_window_destroy_frame (window);
meta_window_queue_move_resize (window);
+ /* because ensure/destroy frame may unmap */
+ meta_window_queue_calc_showing (window);
}
else if (event->atom == XA_WM_CLASS)
{