summaryrefslogtreecommitdiff
path: root/plugingui/eventhandler.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-02-16 14:46:58 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2017-02-16 14:46:58 +0100
commit57f5e6102deaf8903cff99ab30546e536c4d264d (patch)
tree873514a23712f96da73eae71a74b6d592e708ef7 /plugingui/eventhandler.cc
parent5a9c7a43b698813712b036794c1676f2aecc094c (diff)
Fix double click on buttons.
Diffstat (limited to 'plugingui/eventhandler.cc')
-rw-r--r--plugingui/eventhandler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc
index 2cdb6b1..2177433 100644
--- a/plugingui/eventhandler.cc
+++ b/plugingui/eventhandler.cc
@@ -146,14 +146,14 @@ void EventHandler::processEvents()
case EventType::button:
{
- if(lastWasDoubleClick)
+ auto buttonEvent = static_cast<ButtonEvent*>(event.get());
+
+ if(lastWasDoubleClick && (buttonEvent->direction == Direction::down))
{
lastWasDoubleClick = false;
continue;
}
- auto buttonEvent = static_cast<ButtonEvent*>(event.get());
-
lastWasDoubleClick = buttonEvent->doubleClick;
auto widget = window.find(buttonEvent->x, buttonEvent->y);