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:
Jasper St. Pierre 2014-05-21 09:08:39 -04:00
parent 626516d12e
commit 4acb902423
2 changed files with 6 additions and 3 deletions

View File

@ -1828,7 +1828,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
meta_window_get_client_root_coords (display->grab_window,
&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 ())
meta_display_sync_wayland_input_focus (display);

View File

@ -3139,6 +3139,9 @@ meta_window_unmaximize_internal (MetaWindow *window,
window->display->grab_window == window)
{
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);
@ -6553,8 +6556,8 @@ warp_grab_pointer (MetaWindow *window,
display->grab_anchor_root_y = *y;
display->grab_latest_motion_x = *x;
display->grab_latest_motion_y = *y;
meta_window_get_client_root_coords (window,
&display->grab_anchor_window_pos);
meta_window_get_frame_rect (window,
&display->grab_anchor_window_pos);
{
MetaBackend *backend = meta_get_backend ();