forked from AuroraMiddleware/gtk
window: Fix an oversight
Commit 658719a205
moved the call to
gtk_window_compute_default_size() outside the
if (priv->needs_default_size)
but unfortunately, that function cleared that field,
so we never entered the branch.
Keep the setting of priv->needs_default_size in the
branch, where it belongs.
This commit is contained in:
parent
63fb2126db
commit
e9d03d06fe
@ -4222,7 +4222,6 @@ gtk_window_compute_default_size (GtkWindow *window,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
||||
GtkWidget *widget = GTK_WIDGET (window);
|
||||
|
||||
*width = max_width;
|
||||
@ -4257,9 +4256,6 @@ gtk_window_compute_default_size (GtkWindow *window,
|
||||
NULL, NULL);
|
||||
*height = MAX (minimum, MIN (*height, natural));
|
||||
}
|
||||
|
||||
/* No longer use the default settings */
|
||||
priv->need_default_size = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -4288,6 +4284,10 @@ toplevel_compute_size (GdkToplevel *toplevel,
|
||||
{
|
||||
int remembered_width;
|
||||
int remembered_height;
|
||||
|
||||
/* No longer use the default settings */
|
||||
priv->need_default_size = FALSE;
|
||||
|
||||
gtk_window_get_remembered_size (window,
|
||||
&remembered_width, &remembered_height);
|
||||
width = MAX (default_width, remembered_width);
|
||||
|
Loading…
Reference in New Issue
Block a user