mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
window: Correct the anchoring of drag moving / resizing
Now that meta_window_move_resize and friends act in frame rect coordinates, we need to convert the initial grab_anchor_window_pos storage to be in frame rect coordinates as well.
This commit is contained in:
parent
626516d12e
commit
4acb902423
@ -1828,7 +1828,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
|
|
||||||
meta_window_get_client_root_coords (display->grab_window,
|
meta_window_get_client_root_coords (display->grab_window,
|
||||||
&display->grab_initial_window_pos);
|
&display->grab_initial_window_pos);
|
||||||
display->grab_anchor_window_pos = display->grab_initial_window_pos;
|
meta_window_get_frame_rect (display->grab_window, &display->grab_anchor_window_pos);
|
||||||
|
|
||||||
if (meta_is_wayland_compositor ())
|
if (meta_is_wayland_compositor ())
|
||||||
meta_display_sync_wayland_input_focus (display);
|
meta_display_sync_wayland_input_focus (display);
|
||||||
|
@ -3139,6 +3139,9 @@ meta_window_unmaximize_internal (MetaWindow *window,
|
|||||||
window->display->grab_window == window)
|
window->display->grab_window == window)
|
||||||
{
|
{
|
||||||
window->display->grab_anchor_window_pos = window->unconstrained_rect;
|
window->display->grab_anchor_window_pos = window->unconstrained_rect;
|
||||||
|
meta_window_client_rect_to_frame_rect (window,
|
||||||
|
&window->display->grab_anchor_window_pos,
|
||||||
|
&window->display->grab_anchor_window_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_window_recalc_features (window);
|
meta_window_recalc_features (window);
|
||||||
@ -6553,8 +6556,8 @@ warp_grab_pointer (MetaWindow *window,
|
|||||||
display->grab_anchor_root_y = *y;
|
display->grab_anchor_root_y = *y;
|
||||||
display->grab_latest_motion_x = *x;
|
display->grab_latest_motion_x = *x;
|
||||||
display->grab_latest_motion_y = *y;
|
display->grab_latest_motion_y = *y;
|
||||||
meta_window_get_client_root_coords (window,
|
meta_window_get_frame_rect (window,
|
||||||
&display->grab_anchor_window_pos);
|
&display->grab_anchor_window_pos);
|
||||||
|
|
||||||
{
|
{
|
||||||
MetaBackend *backend = meta_get_backend ();
|
MetaBackend *backend = meta_get_backend ();
|
||||||
|
Loading…
Reference in New Issue
Block a user