window.c: Set focus widget before calling enter handler
This way input_get_focus_widget() returns the right widget when called from the enter handler.
This commit is contained in:
+1
-1
@@ -1725,10 +1725,10 @@ input_set_focus_widget(struct input *input, struct widget *focus,
|
|||||||
widget = focus;
|
widget = focus;
|
||||||
if (input->grab)
|
if (input->grab)
|
||||||
widget = input->grab;
|
widget = input->grab;
|
||||||
|
input->focus_widget = focus;
|
||||||
if (widget->enter_handler)
|
if (widget->enter_handler)
|
||||||
pointer = widget->enter_handler(focus, input, x, y,
|
pointer = widget->enter_handler(focus, input, x, y,
|
||||||
widget->user_data);
|
widget->user_data);
|
||||||
input->focus_widget = focus;
|
|
||||||
|
|
||||||
input_set_pointer_image(input, pointer);
|
input_set_pointer_image(input, pointer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user