mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
window: Fix placement not actually placing windows
Since we often call meta_window_move_resize_now immediately after mapping a window, we need to make sure that the placed coordinates are saved in the unconstrained_rect. Ideally, placement positions wouldn't be part of the constraints system, but instead are just done inside meta_window_move_resize_internal as part of a special path. We're still working out the kinks of one large-scale refactor, so it's best not to do another one while the first is going on. This would be a great future cleanup, though: untangling constraints and placement, alongside the force_placement state machine and friends.
This commit is contained in:
parent
dd03a76d51
commit
b32c837df9
@ -3715,6 +3715,16 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
&constrained_rect);
|
||||
}
|
||||
|
||||
/* If we did placement, then we need to save the position that the window
|
||||
* was placed at to make sure that meta_window_move_resize_now places the
|
||||
* window correctly.
|
||||
*/
|
||||
if (did_placement)
|
||||
{
|
||||
window->unconstrained_rect.x = constrained_rect.x;
|
||||
window->unconstrained_rect.y = constrained_rect.y;
|
||||
}
|
||||
|
||||
/* Do the protocol-specific move/resize logic */
|
||||
META_WINDOW_GET_CLASS (window)->move_resize_internal (window, gravity, unconstrained_rect, constrained_rect, flags, &result);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user