wayland: Move window before tiling/maximizing when restoring from session
Ensure the window is placed in coordinates, before maximizing, tiling or minimizing it. This should make the window maximized/tiled on the right (or correctmost) monitor given the stored coordinates. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4311>
This commit is contained in:
parent
351f2fddff
commit
5a7ec6791d
@ -396,6 +396,24 @@ meta_wayland_xdg_session_state_restore_window (MetaSessionState *state,
|
||||
break;
|
||||
}
|
||||
|
||||
if (toplevel_state->workspace_idx >= 0)
|
||||
{
|
||||
meta_window_change_workspace_by_index (window,
|
||||
toplevel_state->workspace_idx,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
if (rect)
|
||||
{
|
||||
meta_window_move_resize (window,
|
||||
(META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE |
|
||||
META_MOVE_RESIZE_WAYLAND_FINISH_MOVE_RESIZE |
|
||||
META_MOVE_RESIZE_MOVE_ACTION |
|
||||
META_MOVE_RESIZE_RESIZE_ACTION |
|
||||
META_MOVE_RESIZE_CONSTRAIN),
|
||||
*rect);
|
||||
}
|
||||
|
||||
switch (toplevel_state->window_state)
|
||||
{
|
||||
case WINDOW_STATE_NONE:
|
||||
@ -416,24 +434,6 @@ meta_wayland_xdg_session_state_restore_window (MetaSessionState *state,
|
||||
if (toplevel_state->is_minimized)
|
||||
meta_window_minimize (window);
|
||||
|
||||
if (toplevel_state->workspace_idx >= 0)
|
||||
{
|
||||
meta_window_change_workspace_by_index (window,
|
||||
toplevel_state->workspace_idx,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
if (rect)
|
||||
{
|
||||
meta_window_move_resize (window,
|
||||
(META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE |
|
||||
META_MOVE_RESIZE_WAYLAND_FINISH_MOVE_RESIZE |
|
||||
META_MOVE_RESIZE_MOVE_ACTION |
|
||||
META_MOVE_RESIZE_RESIZE_ACTION |
|
||||
META_MOVE_RESIZE_CONSTRAIN),
|
||||
*rect);
|
||||
}
|
||||
|
||||
window->placed = TRUE;
|
||||
|
||||
if (meta_is_topic_enabled (META_DEBUG_SESSION_MANAGEMENT))
|
||||
|
Loading…
x
Reference in New Issue
Block a user