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:
Kristian Høgsberg
2012-06-04 23:36:32 -04:00
parent 4e99ac4f20
commit f33984edea
+1 -1
View File
@@ -1725,10 +1725,10 @@ input_set_focus_widget(struct input *input, struct widget *focus,
widget = focus;
if (input->grab)
widget = input->grab;
input->focus_widget = focus;
if (widget->enter_handler)
pointer = widget->enter_handler(focus, input, x, y,
widget->user_data);
input->focus_widget = focus;
input_set_pointer_image(input, pointer);
}