mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
LibGUI: Track double-clicking per individual mouse button.
Clicking two separate buttons in quick succession shouldn't be interpreted as a double click.
This commit is contained in:
parent
d4a8e2930e
commit
ba2e97aa52
2 changed files with 26 additions and 12 deletions
|
@ -191,6 +191,8 @@ private:
|
|||
void handle_leave_event(CEvent&);
|
||||
void do_layout();
|
||||
|
||||
CElapsedTimer& click_clock(GMouseButton);
|
||||
|
||||
GWindow* m_window { nullptr };
|
||||
OwnPtr<GLayout> m_layout;
|
||||
|
||||
|
@ -210,7 +212,9 @@ private:
|
|||
bool m_enabled { true };
|
||||
bool m_layout_dirty { false };
|
||||
|
||||
CElapsedTimer m_click_clock;
|
||||
CElapsedTimer m_left_click_clock;
|
||||
CElapsedTimer m_right_click_clock;
|
||||
CElapsedTimer m_middle_click_clock;
|
||||
|
||||
HashMap<GShortcut, GAction*> m_local_shortcut_actions;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue