summaryrefslogtreecommitdiff
path: root/LibGUI/GWidget.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-26 14:15:11 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-26 14:15:11 +0200
commitba2e97aa52ab18a2e66b83bbf177bc1a864564d2 (patch)
treee0b50bfb0091723170982faac40d299cd930dcfb /LibGUI/GWidget.h
parentd4a8e2930e1c276715c133bda05fbee45bd2c8a6 (diff)
downloadserenity-ba2e97aa52ab18a2e66b83bbf177bc1a864564d2.zip
LibGUI: Track double-clicking per individual mouse button.
Clicking two separate buttons in quick succession shouldn't be interpreted as a double click.
Diffstat (limited to 'LibGUI/GWidget.h')
-rw-r--r--LibGUI/GWidget.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/LibGUI/GWidget.h b/LibGUI/GWidget.h
index eebf6e0a17..1cb7104fa1 100644
--- a/LibGUI/GWidget.h
+++ b/LibGUI/GWidget.h
@@ -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;
};