mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
WindowServer: Preserve cursor position when dragging between states
Previously windows would end up in awkward positions relative to the move cursor when dragging between tile types or unmaximizing. This feels a bit more ergonomic.
This commit is contained in:
parent
ee637b44fb
commit
1cd77fd1b4
2 changed files with 44 additions and 2 deletions
|
@ -409,6 +409,8 @@ private:
|
|||
|
||||
bool is_considered_doubleclick(MouseEvent const&, DoubleClickInfo::ClickMetadata const&) const;
|
||||
|
||||
Gfx::IntPoint to_floating_cursor_position(Gfx::IntPoint const&) const;
|
||||
|
||||
DoubleClickInfo m_double_click_info;
|
||||
int m_double_click_speed { 0 };
|
||||
int m_max_distance_for_double_click { 4 };
|
||||
|
@ -423,6 +425,8 @@ private:
|
|||
WeakPtr<Window> m_move_window;
|
||||
Gfx::IntPoint m_move_origin;
|
||||
Gfx::IntPoint m_move_window_origin;
|
||||
Gfx::IntPoint m_move_window_cursor_position;
|
||||
Gfx::IntPoint m_mouse_down_origin;
|
||||
|
||||
WeakPtr<Window> m_resize_window;
|
||||
WeakPtr<Window> m_resize_candidate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue