wayland: Don't save size when tiled

Don't remember the surface size when we are in tiled
state either. This matches the 'fixed_size' condition
in gdk_wayland_surface_configure_toplevel.

This change fixes an issue where moving a window first
to tiled, then to maximized state and back would lead
to the unmaximized window having the tiled dimensions.
This commit is contained in:
Matthias Clasen
2020-10-05 20:15:33 -04:00
parent d51608a2c9
commit e5cd2568c8

View File

@@ -333,7 +333,9 @@ _gdk_wayland_surface_save_size (GdkSurface *surface)
{
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
if (surface->state & (GDK_TOPLEVEL_STATE_FULLSCREEN | GDK_TOPLEVEL_STATE_MAXIMIZED))
if (surface->state & (GDK_TOPLEVEL_STATE_FULLSCREEN |
GDK_TOPLEVEL_STATE_MAXIMIZED |
GDK_TOPLEVEL_STATE_TILED))
return;
impl->saved_width = surface->width - impl->margin_left - impl->margin_right;