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
This commit is contained in:
Havoc Pennington 2002-08-24 21:49:32 +00:00 committed by Havoc Pennington
parent cbb4a91113
commit f1b58398b0
3 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,12 @@
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
2002-08-24 Havoc Pennington <hp@redhat.com>
* src/window.c (update_sm_hints): hack around bug in kmail etc.

View File

@ -634,6 +634,17 @@ sleep_cb (GtkWidget *button,
sleep (1000);
}
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)
@ -779,6 +790,14 @@ do_appwindow (void)
window, /* user data for callback */
-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",

View File

@ -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)
{