diff options
author | Dave Davenport <qball@gmpclient.org> | 2023-11-24 12:26:24 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2023-11-24 12:26:24 +0100 |
commit | b43a82f86d0cf30e0c7f6d70fbbaa818a617d0be (patch) | |
tree | 857789422a9edc20bcfa049b24aaf8c3cf21eea1 | |
parent | 24c325837969d2ba97ebab0e5b1dcb9e3b756e30 (diff) |
[View] Always forward motion to the grabbed widget first.
-rw-r--r-- | source/view.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/view.c b/source/view.c index f5102a75..6d04503f 100644 --- a/source/view.c +++ b/source/view.c @@ -1944,8 +1944,13 @@ void rofi_view_trigger_action(RofiViewState *state, BindingsScope scope, case SCOPE_MOUSE_SCROLLBAR: case SCOPE_MOUSE_MODE_SWITCHER: { gint x = state->mouse.x, y = state->mouse.y; - widget *target = widget_find_mouse_target(WIDGET(state->main_window), - (WidgetType)scope, x, y); + // If we already captured a motion, always forward action to this widget. + widget *target = state->mouse.motion_target; + // If we have not a previous captured motion, lookup widget. + if (target == NULL) { + target = widget_find_mouse_target(WIDGET(state->main_window), + (WidgetType)scope, x, y); + } if (target == NULL) { return; } |