diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-02-16 14:46:58 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-02-16 14:46:58 +0100 |
commit | 57f5e6102deaf8903cff99ab30546e536c4d264d (patch) | |
tree | 873514a23712f96da73eae71a74b6d592e708ef7 /plugingui | |
parent | 5a9c7a43b698813712b036794c1676f2aecc094c (diff) |
Fix double click on buttons.
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/eventhandler.cc | 6 |
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); |