window: Fix window size snapping back
We were not updating the remembered size at all when the window is interactively resized, causing it to snap back to its default size the next time we call gdk_toplevel_present(). This is a bandaid fix to prevent very broken resizing behavior, until we have properly redone toplevel sizing. Fixes: #3076
This commit is contained in:
@@ -4729,6 +4729,22 @@ surface_size_changed (GtkWidget *widget,
|
||||
|
||||
check_scale_changed (GTK_WINDOW (widget));
|
||||
|
||||
if (!(priv->state & (GDK_TOPLEVEL_STATE_FULLSCREEN |
|
||||
GDK_TOPLEVEL_STATE_MAXIMIZED |
|
||||
GDK_TOPLEVEL_STATE_TILED |
|
||||
GDK_TOPLEVEL_STATE_TOP_TILED |
|
||||
GDK_TOPLEVEL_STATE_RIGHT_TILED |
|
||||
GDK_TOPLEVEL_STATE_BOTTOM_TILED |
|
||||
GDK_TOPLEVEL_STATE_LEFT_TILED |
|
||||
GDK_TOPLEVEL_STATE_MINIMIZED)))
|
||||
{
|
||||
GtkWindowGeometryInfo *info;
|
||||
|
||||
info = gtk_window_get_geometry_info (GTK_WINDOW (widget), TRUE);
|
||||
info->last.configure_request.width = width;
|
||||
info->last.configure_request.height = height;
|
||||
}
|
||||
|
||||
/* priv->configure_request_count incremented for each
|
||||
* configure request, and decremented to a min of 0 for
|
||||
* each configure notify.
|
||||
@@ -5490,7 +5506,6 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
info->last.geometry = new_geometry;
|
||||
info->last.flags = new_flags;
|
||||
info->last.configure_request = new_request;
|
||||
|
||||
/* need to set PPosition so the WM will look at our position,
|
||||
* but we don't want to count PPosition coming and going as a hints
|
||||
* change for future iterations. So we saved info->last prior to
|
||||
|
||||
Reference in New Issue
Block a user