From 56a6d7aec88b170eaf0dd57e14f5fffc24d3b1af Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 21 Feb 2019 23:53:16 +0000 Subject: Fix #7227: Don't apply mouse-hasn't-moved test to scrollbars. --- src/window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/window.cpp b/src/window.cpp index 1729687f2..857029622 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2436,14 +2436,14 @@ static EventState HandleActiveWidget() return ES_HANDLED; } - /* If cursor hasn't moved, there is nothing to do. */ - if (_cursor.delta.x == 0 && _cursor.delta.y == 0) return ES_HANDLED; - /* Handle scrollbar internally, or dispatch click event */ WidgetType type = w->GetWidget(w->mouse_capture_widget)->type; if (type == NWID_VSCROLLBAR || type == NWID_HSCROLLBAR) { HandleScrollbarScrolling(w); } else { + /* If cursor hasn't moved, there is nothing to do. */ + if (_cursor.delta.x == 0 && _cursor.delta.y == 0) return ES_HANDLED; + Point pt = { _cursor.pos.x - w->left, _cursor.pos.y - w->top }; w->OnClick(pt, w->mouse_capture_widget, 0); } -- cgit v1.2.3-54-g00ecf