mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
window: Use the target rect for the grab anchor position on unmaximize
A window's unconstrained_rect is essentially just the target rectangle we hand to meta_window_move_resize_internal() except it's not updated until the window actually moves or resizes. As such, for wayland client resizes, since they're async, using window->unconstrained_rect right after calling move_resize_internal() to update the grab anchor position on unmaximize doesn't work as it does for X clients. To fix this, we can just use the target rectangle for the grab anchor. Note that comment here was already wrong since it says we should be taking constraints into account and yet the code used the unconstrained rect anyway. https://bugzilla.gnome.org/show_bug.cgi?id=770345
This commit is contained in:
parent
5df5b00927
commit
1956a6ae76
@ -3106,14 +3106,12 @@ meta_window_unmaximize (MetaWindow *window,
|
||||
/* When we unmaximize, if we're doing a mouse move also we could
|
||||
* get the window suddenly jumping to the upper left corner of
|
||||
* the workspace, since that's where it was when the grab op
|
||||
* started. So we need to update the grab state. We have to do
|
||||
* it after the actual operation, as the window may have been moved
|
||||
* by constraints.
|
||||
* started. So we need to update the grab anchor position.
|
||||
*/
|
||||
if (meta_grab_op_is_moving (window->display->grab_op) &&
|
||||
window->display->grab_window == window)
|
||||
{
|
||||
window->display->grab_anchor_window_pos = window->unconstrained_rect;
|
||||
window->display->grab_anchor_window_pos = target_rect;
|
||||
}
|
||||
|
||||
meta_window_recalc_features (window);
|
||||
|
Loading…
Reference in New Issue
Block a user