mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
WindowServer: Avoid doing sqrt() in double-click detection
Compare the distance travelled squared against the max distance squared to avoid using sqrt(). Thanks to Nagy Tibor for the suggestion :^)
This commit is contained in:
parent
54caeb1f1a
commit
c8be606acf
2 changed files with 3 additions and 4 deletions
|
@ -228,6 +228,7 @@ private:
|
|||
};
|
||||
DoubleClickInfo m_double_click_info;
|
||||
int m_double_click_speed { 0 };
|
||||
int m_max_distance_for_double_click { 4 };
|
||||
|
||||
WeakPtr<WSWindow> m_active_window;
|
||||
WeakPtr<WSWindow> m_hovered_window;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue