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: https://gitlab.gnome.org/GNOME/mutter/issues/638 https://gitlab.gnome.org/GNOME/mutter/merge_requests/621
This commit is contained in:
parent
db0f85ba5d
commit
59bf1f4838
@ -81,9 +81,10 @@ typedef enum
|
|||||||
META_MOVE_RESIZE_WAYLAND_RESIZE = 1 << 4,
|
META_MOVE_RESIZE_WAYLAND_RESIZE = 1 << 4,
|
||||||
META_MOVE_RESIZE_STATE_CHANGED = 1 << 5,
|
META_MOVE_RESIZE_STATE_CHANGED = 1 << 5,
|
||||||
META_MOVE_RESIZE_UNMAXIMIZE = 1 << 6,
|
META_MOVE_RESIZE_UNMAXIMIZE = 1 << 6,
|
||||||
META_MOVE_RESIZE_FORCE_MOVE = 1 << 7,
|
META_MOVE_RESIZE_UNFULLSCREEN = 1 << 7,
|
||||||
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 8,
|
META_MOVE_RESIZE_FORCE_MOVE = 1 << 8,
|
||||||
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 9,
|
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 9,
|
||||||
|
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 10,
|
||||||
} MetaMoveResizeFlags;
|
} MetaMoveResizeFlags;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -3561,7 +3561,8 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
|||||||
meta_window_move_resize_internal (window,
|
meta_window_move_resize_internal (window,
|
||||||
(META_MOVE_RESIZE_MOVE_ACTION |
|
(META_MOVE_RESIZE_MOVE_ACTION |
|
||||||
META_MOVE_RESIZE_RESIZE_ACTION |
|
META_MOVE_RESIZE_RESIZE_ACTION |
|
||||||
META_MOVE_RESIZE_STATE_CHANGED),
|
META_MOVE_RESIZE_STATE_CHANGED |
|
||||||
|
META_MOVE_RESIZE_UNFULLSCREEN),
|
||||||
NorthWestGravity,
|
NorthWestGravity,
|
||||||
target_rect);
|
target_rect);
|
||||||
|
|
||||||
|
@ -224,6 +224,13 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
|||||||
configured_width = 0;
|
configured_width = 0;
|
||||||
configured_height = 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
|
else
|
||||||
{
|
{
|
||||||
configured_width = constrained_rect.width / geometry_scale;
|
configured_width = constrained_rect.width / geometry_scale;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user