xdg: account for drag resistance in do_late_positioning()

The position where the view should be anchored can now be slightly
different from the current cursor position.

Addresses a TODO from #2009.
This commit is contained in:
John Lindgren 2024-08-02 20:18:21 -04:00 committed by Hiroaki Yamamoto
parent 4bda13d870
commit 1a339f9c7e
3 changed files with 18 additions and 12 deletions

View file

@ -503,8 +503,12 @@ void seat_output_layout_changed(struct seat *seat);
*
* geometry->{width,height} are provided by the caller.
* geometry->{x,y} are computed by this function.
*
* @note When drag-resistance is used, cursor_x/y should be the original
* cursor position when the button was pressed.
*/
void interactive_anchor_to_cursor(struct view *view, struct wlr_box *geometry);
void interactive_anchor_to_cursor(struct view *view, struct wlr_box *geometry,
int cursor_x, int cursor_y);
/**
* interactive_move_tiled_view_to() - Un-tile the tiled/maximized view at the