float sx = wl_fixed_to_double(sx_w);
float sy = wl_fixed_to_double(sy_w);
+ input->sx = sx;
+ input->sy = sy;
+
+ if (!window)
+ return;
+
/* when making the window smaller - e.g. after a unmaximise we might
* still have a pending motion event that the compositor has picked
* based on the old surface dimensions
sy > window->main_surface->allocation.height)
return;
- input->sx = sx;
- input->sy = sy;
-
- if (!window)
- return;
-
if (!(input->grab && input->grab_button)) {
widget = window_find_widget(window, sx, sy);
input_set_focus_widget(input, widget, sx, sy);