Commit 59bf1f48 authored by Jonas Ådahl's avatar Jonas Ådahl Committed by Georges Basile Stavracas Neto

window/wayland: Don't always use constrained size when unfullscreening

When we're unfullscreening, we might be returning to a window state that
has its size either managed by constraints (tiled, maximized), or not
(floating). Lets just pass the configure size 0x0 when we're not using
constrained sizes (i.e. the window going from being fullscreen to not
maximized) and let the application decide how to size itself.

Fixes: #638

!621
parent db0f85ba
Pipeline #88115 passed with stages
in 8 minutes and 14 seconds
......@@ -81,9 +81,10 @@ typedef enum
META_MOVE_RESIZE_WAYLAND_RESIZE = 1 << 4,
META_MOVE_RESIZE_STATE_CHANGED = 1 << 5,
META_MOVE_RESIZE_UNMAXIMIZE = 1 << 6,
META_MOVE_RESIZE_FORCE_MOVE = 1 << 7,
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 8,
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 9,
META_MOVE_RESIZE_UNFULLSCREEN = 1 << 7,
META_MOVE_RESIZE_FORCE_MOVE = 1 << 8,
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 9,
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 10,
} MetaMoveResizeFlags;
typedef enum
......
......@@ -3561,7 +3561,8 @@ meta_window_unmake_fullscreen (MetaWindow *window)
meta_window_move_resize_internal (window,
(META_MOVE_RESIZE_MOVE_ACTION |
META_MOVE_RESIZE_RESIZE_ACTION |
META_MOVE_RESIZE_STATE_CHANGED),
META_MOVE_RESIZE_STATE_CHANGED |
META_MOVE_RESIZE_UNFULLSCREEN),
NorthWestGravity,
target_rect);
......
......@@ -224,6 +224,13 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
configured_width = 0;
configured_height = 0;
}
else if (flags & META_MOVE_RESIZE_UNFULLSCREEN &&
!meta_window_get_maximized (window) &&
meta_window_get_tile_mode (window) == META_TILE_NONE)
{
configured_width = 0;
configured_height = 0;
}
else
{
configured_width = constrained_rect.width / geometry_scale;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment