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.
dev
Kristian Høgsberg 13 years ago
parent 4e99ac4f20
commit f33984edea
  1. 2
      clients/window.c

@ -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);
} }

Loading…
Cancel
Save