fix for bug 17936 making windows smaller after they have become visible r=waterson

This commit is contained in:
pavlov%netscape.com 1999-11-17 05:47:45 +00:00
parent 73a40c9a94
commit 23101c395a
2 changed files with 6 additions and 0 deletions

View File

@ -396,6 +396,9 @@ NS_IMETHODIMP nsWidget::CaptureRollupEvents(nsIRollupListener * aListener, PRBoo
}
else
{
#ifdef DEBUG_pavlov
int ret =
#endif
gdk_pointer_grab (GTK_LAYOUT(mWidget)->bin_window, PR_TRUE,(GdkEventMask)
(GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |

View File

@ -1963,6 +1963,9 @@ NS_IMETHODIMP nsWindow::Resize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint)
// toplevel window? if so, we should resize it as well.
if (mIsToplevel && mShell)
{
if (GTK_WIDGET_VISIBLE(mShell) && GTK_WIDGET_REALIZED(mShell)) // set_default_size won't make a window smaller after it is visible
gdk_window_resize(mShell->window, aWidth, aHeight);
gtk_window_set_default_size(GTK_WINDOW(mShell), aWidth, aHeight);
}
gdk_superwin_resize(mSuperWin, aWidth, aHeight);