Merge branch 'issue1044' into 'gtk-3-24'

Fix resize requests being forgotten when maximizing a hidden window

See merge request GNOME/gtk!367
This commit is contained in:
Matthias Clasen
2019-09-03 15:43:07 +00:00
2 changed files with 10 additions and 9 deletions

View File

@@ -3311,6 +3311,12 @@ gdk_window_wayland_move_resize (GdkWindow *window,
}
}
if (window->state & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED))
{
impl->saved_width = width;
impl->saved_height = height;
}
/* If this function is called with width and height = -1 then that means
* just move the window - don't update its size
*/

View File

@@ -9416,8 +9416,9 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
info = gtk_window_get_geometry_info (window, FALSE);
if (priv->need_default_size ||
priv->force_resize)
if ((priv->need_default_size || priv->force_resize) &&
!priv->maximized &&
!priv->fullscreen)
{
gtk_window_guess_default_size (window, width, height);
gtk_window_get_remembered_size (window, &w, &h);
@@ -9453,13 +9454,7 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
gtk_window_get_remembered_size (window, width, height);
}
/* Override any size with gtk_window_resize() values */
if (priv->maximized || priv->fullscreen)
{
/* Unless we are maximized or fullscreen */
gtk_window_get_remembered_size (window, width, height);
}
else if (info)
if (info)
{
gint resize_width_csd = info->resize_width;
gint resize_height_csd = info->resize_height;