Bug 408095 - "Screen artifacts when opening a hidechrome window" [p=kinetik@flim.org (Matthew Gregan) r+sr+a1.9=roc]

This commit is contained in:
reed@reedloden.com 2008-01-14 01:35:19 -08:00
parent e78164a3a7
commit 520f5a614d

View File

@ -4050,7 +4050,11 @@ nsWindow::HideWindowChrome(PRBool aShouldHide)
// Sawfish, metacity, and presumably other window managers get
// confused if we change the window decorations while the window
// is visible.
gdk_window_hide(mShell->window);
PRBool wasVisible = PR_FALSE;
if (gdk_window_is_visible(mShell->window)) {
gdk_window_hide(mShell->window);
wasVisible = PR_TRUE;
}
gint wmd;
if (aShouldHide)
@ -4060,7 +4064,8 @@ nsWindow::HideWindowChrome(PRBool aShouldHide)
gdk_window_set_decorations(mShell->window, (GdkWMDecoration) wmd);
gdk_window_show(mShell->window);
if (wasVisible)
gdk_window_show(mShell->window);
// For some window managers, adding or removing window decorations
// requires unmapping and remapping our toplevel window. Go ahead