struct weston_seat *seat = resource->data;
struct weston_surface *surface = NULL;
- if (serial < seat->seat.pointer->focus_serial)
- return;
- if (seat->seat.pointer->focus == NULL)
- return;
- if (seat->seat.pointer->focus->resource.client != client)
- return;
-
if (surface_resource)
surface = container_of(surface_resource->data,
struct weston_surface, surface);
- if (surface && surface != seat->sprite && surface->configure) {
- wl_resource_post_error(&surface->surface.resource,
- WL_DISPLAY_ERROR_INVALID_OBJECT,
- "surface->configure already set");
+ if (serial < seat->seat.pointer->focus_serial)
return;
+
+ if (surface && surface != seat->sprite) {
+ if (seat->seat.pointer->focus == NULL)
+ return;
+ if (seat->seat.pointer->focus->resource.client != client)
+ return;
+
+ if (surface->configure) {
+ wl_resource_post_error(&surface->surface.resource,
+ WL_DISPLAY_ERROR_INVALID_OBJECT,
+ "surface->configure already "
+ "set");
+ return;
+ }
}
if (seat->sprite)