Skip to content

Commit

Permalink
[View] Always forward motion to the grabbed widget first.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveDavenport committed Nov 24, 2023
1 parent 24c3258 commit b43a82f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b43a82f

Please sign in to comment.