if (device->keyboard_focus &&
(!surface || device->keyboard_focus->base.client != surface->base.client))
- wl_surface_post_event(&device->keyboard_focus->base,
- &device->base.base,
- WL_INPUT_DEVICE_KEYBOARD_FOCUS,
- time, NULL, &device->keys);
+ wl_client_post_event(device->keyboard_focus->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_KEYBOARD_FOCUS,
+ time, NULL, &device->keys);
if (surface)
- wl_surface_post_event(&surface->base,
- &device->base.base,
- WL_INPUT_DEVICE_KEYBOARD_FOCUS,
- time, &surface->base, &device->keys);
+ wl_client_post_event(surface->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_KEYBOARD_FOCUS,
+ time, &surface->base, &device->keys);
device->keyboard_focus = surface;
}
if (device->pointer_focus &&
(!surface || device->pointer_focus->base.client != surface->base.client))
- wl_surface_post_event(&device->pointer_focus->base,
- &device->base.base,
- WL_INPUT_DEVICE_POINTER_FOCUS,
- time, NULL, 0, 0, 0, 0);
+ wl_client_post_event(device->pointer_focus->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_POINTER_FOCUS,
+ time, NULL, 0, 0, 0, 0);
if (surface)
- wl_surface_post_event(&surface->base,
- &device->base.base,
- WL_INPUT_DEVICE_POINTER_FOCUS,
- time, &surface->base,
- x, y, sx, sy);
+ wl_client_post_event(surface->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_POINTER_FOCUS,
+ time, &surface->base,
+ x, y, sx, sy);
if (!surface)
wlsc_input_device_set_pointer_image(device,
wlsc_input_device_set_pointer_focus(device, es,
time, x, y, sx, sy);
if (es)
- wl_surface_post_event(&es->base, &device->base.base,
- WL_INPUT_DEVICE_MOTION,
- time, x, y, sx, sy);
+ wl_client_post_event(es->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_MOTION,
+ time, x, y, sx, sy);
break;
case WLSC_DEVICE_GRAB_MOTION:
es = device->pointer_focus;
wlsc_surface_transform(es, x, y, &sx, &sy);
- wl_surface_post_event(&es->base, &device->base.base,
- WL_INPUT_DEVICE_MOTION,
- time, x, y, sx, sy);
+ wl_client_post_event(es->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_MOTION,
+ time, x, y, sx, sy);
break;
case WLSC_DEVICE_GRAB_MOVE:
es = device->grab_surface;
es->x = x + device->grab_dx;
es->y = y + device->grab_dy;;
- wl_surface_post_event(&es->base, &ec->shell.base,
- WL_SHELL_CONFIGURE,
- time, device->grab,
- &es->base, es->x, es->y,
- es->width, es->height);
+ wl_client_post_event(es->base.client,
+ &ec->shell.base,
+ WL_SHELL_CONFIGURE,
+ time, device->grab,
+ &es->base, es->x, es->y,
+ es->width, es->height);
wlsc_surface_update_matrix(es);
height = device->grab_height;
}
- wl_surface_post_event(&es->base, &ec->shell.base,
- WL_SHELL_CONFIGURE, time, device->grab,
- &es->base, sx, sy, width, height);
+ wl_client_post_event(es->base.client,
+ &ec->shell.base,
+ WL_SHELL_CONFIGURE, time, device->grab,
+ &es->base, sx, sy, width, height);
break;
case WLSC_DEVICE_GRAB_DRAG:
wl_drag_set_pointer_focus(device->drag,
es, time, x, y, sx, sy);
if (es)
- wl_surface_post_event(&es->base,
- &device->drag->drag_offer.base,
- WL_DRAG_OFFER_MOTION,
- time, x, y, sx, sy);
+ wl_client_post_event(es->base.client,
+ &device->drag->drag_offer.base,
+ WL_DRAG_OFFER_MOTION,
+ time, x, y, sx, sy);
break;
}
WLSC_DEVICE_GRAB_RESIZE_BOTTOM_RIGHT);
else if (device->grab == WLSC_DEVICE_GRAB_NONE ||
device->grab == WLSC_DEVICE_GRAB_MOTION)
- wl_surface_post_event(&surface->base,
- &device->base.base,
- WL_INPUT_DEVICE_BUTTON,
- time, button, state);
+ wl_client_post_event(surface->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_BUTTON,
+ time, button, state);
if (!state &&
device->grab != WLSC_DEVICE_GRAB_NONE &&
}
if (device->keyboard_focus != NULL)
- wl_surface_post_event(&device->keyboard_focus->base,
- &device->base.base,
- WL_INPUT_DEVICE_KEY, time, key, state);
+ wl_client_post_event(device->keyboard_focus->base.client,
+ &device->base.base,
+ WL_INPUT_DEVICE_KEY, time, key, state);
}
static void
if (drag->pointer_focus &&
(!surface || drag->pointer_focus->client != surface->base.client))
- wl_surface_post_event(drag->pointer_focus,
+ wl_client_post_event(drag->pointer_focus->client,
&drag->drag_offer.base,
WL_DRAG_OFFER_POINTER_FOCUS,
time, NULL, 0, 0, 0, 0);
end = drag->types.data + drag->types.size;
for (p = drag->types.data; p < end; p++)
- wl_surface_post_event(&surface->base,
+ wl_client_post_event(surface->base.client,
&drag->drag_offer.base,
WL_DRAG_OFFER_OFFER, *p);
}
if (surface) {
- wl_surface_post_event(&surface->base,
- &drag->drag_offer.base,
- WL_DRAG_OFFER_POINTER_FOCUS,
- time, &surface->base,
- x, y, sx, sy);
+ wl_client_post_event(surface->base.client,
+ &drag->drag_offer.base,
+ WL_DRAG_OFFER_POINTER_FOCUS,
+ time, &surface->base,
+ x, y, sx, sy);
}
if (type && strcmp(*p, type) == 0)
drag->type = *p;
- wl_surface_post_event(drag->source, &drag->resource.base,
- WL_DRAG_TARGET, drag->type);
+ wl_client_post_event(drag->source->client, &drag->resource.base,
+ WL_DRAG_TARGET, drag->type);
}
static void
{
struct wl_drag *drag = container_of(offer, struct wl_drag, drag_offer);
- wl_surface_post_event(drag->source, &drag->resource.base,
- WL_DRAG_FINISH, fd);
+ wl_client_post_event(drag->source->client, &drag->resource.base,
+ WL_DRAG_FINISH, fd);
close(fd);
}