This is now a weston object.
/* If a pointer falls outside the outputs new geometry, move it to its
* lower-right corner */
wl_list_for_each(seat, &output->compositor->seat_list, link) {
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
int32_t x, y;
if (!pointer)
weston_keyboard_set_focus(seat->seat.keyboard, NULL);
if (seat->seat.pointer &&
seat->seat.pointer->focus == &surface->surface)
- wl_pointer_set_focus(seat->seat.pointer,
- NULL,
- wl_fixed_from_int(0),
- wl_fixed_from_int(0));
+ weston_pointer_set_focus(seat->seat.pointer,
+ NULL,
+ wl_fixed_from_int(0),
+ wl_fixed_from_int(0));
}
weston_surface_schedule_repaint(surface);
uint16_t *b);
};
-struct wl_pointer_grab;
-struct wl_pointer_grab_interface {
- void (*focus)(struct wl_pointer_grab *grab,
+struct weston_pointer_grab;
+struct weston_pointer_grab_interface {
+ void (*focus)(struct weston_pointer_grab *grab,
struct wl_surface *surface,
wl_fixed_t x,
wl_fixed_t y);
- void (*motion)(struct wl_pointer_grab *grab,
+ void (*motion)(struct weston_pointer_grab *grab,
uint32_t time,
wl_fixed_t x,
wl_fixed_t y);
- void (*button)(struct wl_pointer_grab *grab,
+ void (*button)(struct weston_pointer_grab *grab,
uint32_t time, uint32_t button, uint32_t state);
};
-struct wl_pointer_grab {
- const struct wl_pointer_grab_interface *interface;
- struct wl_pointer *pointer;
+struct weston_pointer_grab {
+ const struct weston_pointer_grab_interface *interface;
+ struct weston_pointer *pointer;
struct wl_surface *focus;
wl_fixed_t x, y;
};
void (*cancel)(struct wl_data_source *source);
};
-struct wl_pointer {
+struct weston_pointer {
struct wl_seat *seat;
struct wl_list resource_list;
uint32_t focus_serial;
struct wl_signal focus_signal;
- struct wl_pointer_grab *grab;
- struct wl_pointer_grab default_grab;
+ struct weston_pointer_grab *grab;
+ struct weston_pointer_grab default_grab;
wl_fixed_t grab_x, grab_y;
uint32_t grab_button;
uint32_t grab_serial;
struct wl_list base_resource_list;
struct wl_signal destroy_signal;
- struct wl_pointer *pointer;
+ struct weston_pointer *pointer;
struct weston_keyboard *keyboard;
struct wl_touch *touch;
struct wl_surface *drag_focus;
struct wl_resource *drag_focus_resource;
struct wl_listener drag_focus_listener;
- struct wl_pointer_grab drag_grab;
+ struct weston_pointer_grab drag_grab;
struct wl_surface *drag_surface;
struct wl_listener drag_icon_listener;
struct wl_signal drag_icon_signal;
wl_seat_release(struct wl_seat *seat);
void
-wl_seat_set_pointer(struct wl_seat *seat, struct wl_pointer *pointer);
+wl_seat_set_pointer(struct wl_seat *seat, struct weston_pointer *pointer);
void
wl_seat_set_keyboard(struct wl_seat *seat, struct weston_keyboard *keyboard);
void
wl_seat_set_touch(struct wl_seat *seat, struct wl_touch *touch);
void
-wl_pointer_init(struct wl_pointer *pointer);
+weston_pointer_init(struct weston_pointer *pointer);
void
-wl_pointer_release(struct wl_pointer *pointer);
+weston_pointer_release(struct weston_pointer *pointer);
void
-wl_pointer_set_focus(struct wl_pointer *pointer, struct wl_surface *surface,
- wl_fixed_t sx, wl_fixed_t sy);
+weston_pointer_set_focus(struct weston_pointer *pointer,
+ struct wl_surface *surface,
+ wl_fixed_t sx, wl_fixed_t sy);
void
-wl_pointer_start_grab(struct wl_pointer *pointer,
- struct wl_pointer_grab *grab);
+weston_pointer_start_grab(struct weston_pointer *pointer,
+ struct weston_pointer_grab *grab);
void
-wl_pointer_end_grab(struct wl_pointer *pointer);
+weston_pointer_end_grab(struct weston_pointer *pointer);
void
-wl_pointer_set_current(struct wl_pointer *pointer, struct wl_surface *surface);
+weston_pointer_set_current(struct weston_pointer *pointer,
+ struct wl_surface *surface);
void
weston_keyboard_init(struct weston_keyboard *keyboard);
struct weston_seat {
struct wl_seat seat;
- struct wl_pointer pointer;
+ struct weston_pointer pointer;
int has_pointer;
struct weston_keyboard keyboard;
int has_keyboard;
}
static void
-drag_grab_focus(struct wl_pointer_grab *grab,
+drag_grab_focus(struct weston_pointer_grab *grab,
struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y)
{
struct wl_seat *seat = container_of(grab, struct wl_seat, drag_grab);
}
static void
-drag_grab_motion(struct wl_pointer_grab *grab,
+drag_grab_motion(struct weston_pointer_grab *grab,
uint32_t time, wl_fixed_t x, wl_fixed_t y)
{
struct wl_seat *seat = container_of(grab, struct wl_seat, drag_grab);
drag_grab_focus(&seat->drag_grab, NULL,
wl_fixed_from_int(0), wl_fixed_from_int(0));
- wl_pointer_end_grab(seat->pointer);
+ weston_pointer_end_grab(seat->pointer);
seat->drag_data_source = NULL;
seat->drag_client = NULL;
}
static void
-drag_grab_button(struct wl_pointer_grab *grab,
+drag_grab_button(struct weston_pointer_grab *grab,
uint32_t time, uint32_t button, uint32_t state_w)
{
struct wl_seat *seat = container_of(grab, struct wl_seat, drag_grab);
}
}
-static const struct wl_pointer_grab_interface drag_grab_interface = {
+static const struct weston_pointer_grab_interface drag_grab_interface = {
drag_grab_focus,
drag_grab_motion,
drag_grab_button,
wl_signal_emit(&seat->drag_icon_signal, icon_resource);
}
- wl_pointer_set_focus(seat->pointer, NULL,
- wl_fixed_from_int(0), wl_fixed_from_int(0));
- wl_pointer_start_grab(seat->pointer, &seat->drag_grab);
+ weston_pointer_set_focus(seat->pointer, NULL,
+ wl_fixed_from_int(0), wl_fixed_from_int(0));
+ weston_pointer_start_grab(seat->pointer, &seat->drag_grab);
}
static void
void
weston_seat_repick(struct weston_seat *seat)
{
- const struct wl_pointer_grab_interface *interface;
+ const struct weston_pointer_grab_interface *interface;
struct weston_surface *surface, *focus;
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
if (!pointer)
return;
if (&surface->surface != pointer->current) {
interface = pointer->grab->interface;
- wl_pointer_set_current(pointer, &surface->surface);
+ weston_pointer_set_current(pointer, &surface->surface);
interface->focus(pointer->grab, &surface->surface,
pointer->current_x,
pointer->current_y);
static void
lose_pointer_focus(struct wl_listener *listener, void *data)
{
- struct wl_pointer *pointer =
- container_of(listener, struct wl_pointer, focus_listener);
+ struct weston_pointer *pointer =
+ container_of(listener, struct weston_pointer, focus_listener);
pointer->focus_resource = NULL;
}
}
static void
-default_grab_focus(struct wl_pointer_grab *grab,
+default_grab_focus(struct weston_pointer_grab *grab,
struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y)
{
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
if (pointer->button_count > 0)
return;
- wl_pointer_set_focus(pointer, surface, x, y);
+ weston_pointer_set_focus(pointer, surface, x, y);
}
static void
-default_grab_motion(struct wl_pointer_grab *grab,
+default_grab_motion(struct weston_pointer_grab *grab,
uint32_t time, wl_fixed_t x, wl_fixed_t y)
{
struct wl_resource *resource;
}
static void
-default_grab_button(struct wl_pointer_grab *grab,
+default_grab_button(struct weston_pointer_grab *grab,
uint32_t time, uint32_t button, uint32_t state_w)
{
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
struct wl_resource *resource;
uint32_t serial;
enum wl_pointer_button_state state = state_w;
if (pointer->button_count == 0 &&
state == WL_POINTER_BUTTON_STATE_RELEASED)
- wl_pointer_set_focus(pointer, pointer->current,
- pointer->current_x, pointer->current_y);
+ weston_pointer_set_focus(pointer, pointer->current,
+ pointer->current_x,
+ pointer->current_y);
}
-static const struct wl_pointer_grab_interface
+static const struct weston_pointer_grab_interface
default_pointer_grab_interface = {
default_grab_focus,
default_grab_motion,
uint32_t mods_locked, uint32_t group)
{
struct weston_keyboard *keyboard = grab->keyboard;
- struct wl_pointer *pointer = keyboard->seat->pointer;
+ struct weston_pointer *pointer = keyboard->seat->pointer;
struct wl_resource *resource, *pr;
resource = keyboard->focus_resource;
};
WL_EXPORT void
-wl_pointer_init(struct wl_pointer *pointer)
+weston_pointer_init(struct weston_pointer *pointer)
{
memset(pointer, 0, sizeof *pointer);
wl_list_init(&pointer->resource_list);
}
WL_EXPORT void
-wl_pointer_release(struct wl_pointer *pointer)
+weston_pointer_release(struct weston_pointer *pointer)
{
/* XXX: What about pointer->resource_list? */
if (pointer->focus_resource)
wl_signal_emit(&seat->destroy_signal, seat);
if (seat->pointer)
- wl_pointer_release(seat->pointer);
+ weston_pointer_release(seat->pointer);
if (seat->keyboard)
weston_keyboard_release(seat->keyboard);
if (seat->touch)
}
WL_EXPORT void
-wl_seat_set_pointer(struct wl_seat *seat, struct wl_pointer *pointer)
+wl_seat_set_pointer(struct wl_seat *seat, struct weston_pointer *pointer)
{
if (pointer && (seat->pointer || pointer->seat))
return; /* XXX: error? */
}
WL_EXPORT void
-wl_pointer_set_focus(struct wl_pointer *pointer, struct wl_surface *surface,
- wl_fixed_t sx, wl_fixed_t sy)
+weston_pointer_set_focus(struct weston_pointer *pointer,
+ struct wl_surface *surface,
+ wl_fixed_t sx, wl_fixed_t sy)
{
struct weston_keyboard *kbd = pointer->seat->keyboard;
struct wl_resource *resource, *kr;
}
WL_EXPORT void
-wl_pointer_start_grab(struct wl_pointer *pointer, struct wl_pointer_grab *grab)
+weston_pointer_start_grab(struct weston_pointer *pointer,
+ struct weston_pointer_grab *grab)
{
- const struct wl_pointer_grab_interface *interface;
+ const struct weston_pointer_grab_interface *interface;
pointer->grab = grab;
interface = pointer->grab->interface;
}
WL_EXPORT void
-wl_pointer_end_grab(struct wl_pointer *pointer)
+weston_pointer_end_grab(struct weston_pointer *pointer)
{
- const struct wl_pointer_grab_interface *interface;
+ const struct weston_pointer_grab_interface *interface;
pointer->grab = &pointer->default_grab;
interface = pointer->grab->interface;
static void
current_surface_destroy(struct wl_listener *listener, void *data)
{
- struct wl_pointer *pointer =
- container_of(listener, struct wl_pointer, current_listener);
+ struct weston_pointer *pointer =
+ container_of(listener, struct weston_pointer, current_listener);
pointer->current = NULL;
}
WL_EXPORT void
-wl_pointer_set_current(struct wl_pointer *pointer, struct wl_surface *surface)
+weston_pointer_set_current(struct weston_pointer *pointer,
+ struct wl_surface *surface)
{
if (pointer->current)
wl_list_remove(&pointer->current_listener.link);
move_pointer(struct weston_seat *seat, wl_fixed_t x, wl_fixed_t y)
{
struct weston_compositor *ec = seat->compositor;
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
struct weston_output *output;
int32_t ix, iy;
notify_motion(struct weston_seat *seat,
uint32_t time, wl_fixed_t dx, wl_fixed_t dy)
{
- const struct wl_pointer_grab_interface *interface;
+ const struct weston_pointer_grab_interface *interface;
struct weston_compositor *ec = seat->compositor;
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
weston_compositor_wake(ec);
notify_motion_absolute(struct weston_seat *seat,
uint32_t time, wl_fixed_t x, wl_fixed_t y)
{
- const struct wl_pointer_grab_interface *interface;
+ const struct weston_pointer_grab_interface *interface;
struct weston_compositor *ec = seat->compositor;
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
weston_compositor_wake(ec);
enum wl_pointer_button_state state)
{
struct weston_compositor *compositor = seat->compositor;
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
struct weston_surface *focus =
(struct weston_surface *) pointer->focus;
uint32_t serial = wl_display_next_serial(compositor->wl_display);
wl_fixed_t value)
{
struct weston_compositor *compositor = seat->compositor;
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
struct weston_surface *focus =
(struct weston_surface *) pointer->focus;
uint32_t serial = wl_display_next_serial(compositor->wl_display);
compositor->focus = 1;
} else {
compositor->focus = 0;
- /* FIXME: We should call wl_pointer_set_focus(seat,
+ /* FIXME: We should call weston_pointer_set_focus(seat,
* NULL) here, but somehow that breaks re-entry... */
}
}
seat->seat.pointer->y,
&sx,
&sy);
- wl_pointer_set_focus(seat->seat.pointer,
- seat->seat.pointer->focus,
- sx,
- sy);
+ weston_pointer_set_focus(seat->seat.pointer,
+ seat->seat.pointer->focus,
+ sx,
+ sy);
}
}
if (seat->has_pointer)
return;
- wl_pointer_init(&seat->pointer);
+ weston_pointer_init(&seat->pointer);
wl_seat_set_pointer(&seat->seat, &seat->pointer);
seat->has_pointer = 1;
};
struct shell_grab {
- struct wl_pointer_grab grab;
+ struct weston_pointer_grab grab;
struct shell_surface *shsurf;
struct wl_listener shsurf_destroy_listener;
- struct wl_pointer *pointer;
+ struct weston_pointer *pointer;
};
struct weston_move_grab {
struct wl_listener seat_destroy_listener;
struct {
- struct wl_pointer_grab grab;
+ struct weston_pointer_grab grab;
struct wl_list surfaces_list;
struct wl_client *client;
int32_t initial_up;
}
static void
-popup_grab_end(struct wl_pointer *pointer);
+popup_grab_end(struct weston_pointer *pointer);
static void
shell_grab_start(struct shell_grab *grab,
- const struct wl_pointer_grab_interface *interface,
+ const struct weston_pointer_grab_interface *interface,
struct shell_surface *shsurf,
- struct wl_pointer *pointer,
+ struct weston_pointer *pointer,
enum desktop_shell_cursor cursor)
{
struct desktop_shell *shell = shsurf->shell;
grab->pointer = pointer;
grab->grab.focus = &shsurf->surface->surface;
- wl_pointer_start_grab(pointer, &grab->grab);
+ weston_pointer_start_grab(pointer, &grab->grab);
desktop_shell_send_grab_cursor(shell->child.desktop_shell, cursor);
- wl_pointer_set_focus(pointer, &shell->grab_surface->surface,
- wl_fixed_from_int(0), wl_fixed_from_int(0));
+ weston_pointer_set_focus(pointer, &shell->grab_surface->surface,
+ wl_fixed_from_int(0), wl_fixed_from_int(0));
}
static void
if (grab->shsurf)
wl_list_remove(&grab->shsurf_destroy_listener.link);
- wl_pointer_end_grab(grab->pointer);
+ weston_pointer_end_grab(grab->pointer);
}
static void
}
static void
-noop_grab_focus(struct wl_pointer_grab *grab,
+noop_grab_focus(struct weston_pointer_grab *grab,
struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y)
{
grab->focus = NULL;
}
static void
-move_grab_motion(struct wl_pointer_grab *grab,
+move_grab_motion(struct weston_pointer_grab *grab,
uint32_t time, wl_fixed_t x, wl_fixed_t y)
{
struct weston_move_grab *move = (struct weston_move_grab *) grab;
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
struct shell_surface *shsurf = move->base.shsurf;
struct weston_surface *es;
int dx = wl_fixed_to_int(pointer->x + move->dx);
}
static void
-move_grab_button(struct wl_pointer_grab *grab,
+move_grab_button(struct weston_pointer_grab *grab,
uint32_t time, uint32_t button, uint32_t state_w)
{
struct shell_grab *shell_grab = container_of(grab, struct shell_grab,
grab);
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
enum wl_pointer_button_state state = state_w;
if (pointer->button_count == 0 &&
}
}
-static const struct wl_pointer_grab_interface move_grab_interface = {
+static const struct weston_pointer_grab_interface move_grab_interface = {
noop_grab_focus,
move_grab_motion,
move_grab_button,
};
static void
-resize_grab_motion(struct wl_pointer_grab *grab,
+resize_grab_motion(struct weston_pointer_grab *grab,
uint32_t time, wl_fixed_t x, wl_fixed_t y)
{
struct weston_resize_grab *resize = (struct weston_resize_grab *) grab;
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
struct shell_surface *shsurf = resize->base.shsurf;
int32_t width, height;
wl_fixed_t from_x, from_y;
};
static void
-resize_grab_button(struct wl_pointer_grab *grab,
+resize_grab_button(struct weston_pointer_grab *grab,
uint32_t time, uint32_t button, uint32_t state_w)
{
struct weston_resize_grab *resize = (struct weston_resize_grab *) grab;
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
enum wl_pointer_button_state state = state_w;
if (pointer->button_count == 0 &&
}
}
-static const struct wl_pointer_grab_interface resize_grab_interface = {
+static const struct weston_pointer_grab_interface resize_grab_interface = {
noop_grab_focus,
resize_grab_motion,
resize_grab_button,
}
static void
-busy_cursor_grab_focus(struct wl_pointer_grab *base,
+busy_cursor_grab_focus(struct weston_pointer_grab *base,
struct wl_surface *surface, int32_t x, int32_t y)
{
struct shell_grab *grab = (struct shell_grab *) base;
}
static void
-busy_cursor_grab_motion(struct wl_pointer_grab *grab,
+busy_cursor_grab_motion(struct weston_pointer_grab *grab,
uint32_t time, int32_t x, int32_t y)
{
}
static void
-busy_cursor_grab_button(struct wl_pointer_grab *base,
+busy_cursor_grab_button(struct weston_pointer_grab *base,
uint32_t time, uint32_t button, uint32_t state)
{
struct shell_grab *grab = (struct shell_grab *) base;
}
}
-static const struct wl_pointer_grab_interface busy_cursor_grab_interface = {
+static const struct weston_pointer_grab_interface busy_cursor_grab_interface = {
busy_cursor_grab_focus,
busy_cursor_grab_motion,
busy_cursor_grab_button,
};
static void
-set_busy_cursor(struct shell_surface *shsurf, struct wl_pointer *pointer)
+set_busy_cursor(struct shell_surface *shsurf, struct weston_pointer *pointer)
{
struct shell_grab *grab;
}
static void
-end_busy_cursor(struct shell_surface *shsurf, struct wl_pointer *pointer)
+end_busy_cursor(struct shell_surface *shsurf, struct weston_pointer *pointer)
{
struct shell_grab *grab = (struct shell_grab *) pointer->grab;
static void
handle_pointer_focus(struct wl_listener *listener, void *data)
{
- struct wl_pointer *pointer = data;
+ struct weston_pointer *pointer = data;
struct weston_surface *surface =
(struct weston_surface *) pointer->focus;
struct weston_compositor *compositor;
struct desktop_shell *shell = shsurf->shell;
struct weston_seat *seat;
struct weston_compositor *ec = shsurf->surface->compositor;
- struct wl_pointer *pointer;
+ struct weston_pointer *pointer;
int was_unresponsive;
if (shsurf->ping_timer == NULL)
set_fullscreen(shsurf, method, framerate, output);
}
-static const struct wl_pointer_grab_interface popup_grab_interface;
+static const struct weston_pointer_grab_interface popup_grab_interface;
static void
destroy_shell_seat(struct wl_listener *listener, void *data)
struct shell_surface *shsurf, *prev = NULL;
if (shseat->popup_grab.grab.interface == &popup_grab_interface) {
- wl_pointer_end_grab(shseat->popup_grab.grab.pointer);
+ weston_pointer_end_grab(shseat->popup_grab.grab.pointer);
shseat->popup_grab.client = NULL;
wl_list_for_each(shsurf, &shseat->popup_grab.surfaces_list, popup.grab_link) {
}
static void
-popup_grab_focus(struct wl_pointer_grab *grab,
+popup_grab_focus(struct weston_pointer_grab *grab,
struct wl_surface *surface,
wl_fixed_t x,
wl_fixed_t y)
{
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
struct shell_seat *shseat =
container_of(grab, struct shell_seat, popup_grab.grab);
struct wl_client *client = shseat->popup_grab.client;
if (surface && surface->resource.client == client) {
- wl_pointer_set_focus(pointer, surface, x, y);
+ weston_pointer_set_focus(pointer, surface, x, y);
grab->focus = surface;
} else {
- wl_pointer_set_focus(pointer, NULL,
- wl_fixed_from_int(0),
- wl_fixed_from_int(0));
+ weston_pointer_set_focus(pointer, NULL,
+ wl_fixed_from_int(0),
+ wl_fixed_from_int(0));
grab->focus = NULL;
}
}
static void
-popup_grab_motion(struct wl_pointer_grab *grab,
+popup_grab_motion(struct weston_pointer_grab *grab,
uint32_t time, wl_fixed_t sx, wl_fixed_t sy)
{
struct wl_resource *resource;
}
static void
-popup_grab_button(struct wl_pointer_grab *grab,
+popup_grab_button(struct weston_pointer_grab *grab,
uint32_t time, uint32_t button, uint32_t state_w)
{
struct wl_resource *resource;
shseat->popup_grab.initial_up = 1;
}
-static const struct wl_pointer_grab_interface popup_grab_interface = {
+static const struct weston_pointer_grab_interface popup_grab_interface = {
popup_grab_focus,
popup_grab_motion,
popup_grab_button,
};
static void
-popup_grab_end(struct wl_pointer *pointer)
+popup_grab_end(struct weston_pointer *pointer)
{
- struct wl_pointer_grab *grab = pointer->grab;
+ struct weston_pointer_grab *grab = pointer->grab;
struct shell_seat *shseat =
container_of(grab, struct shell_seat, popup_grab.grab);
struct shell_surface *shsurf;
struct shell_surface *prev = NULL;
if (pointer->grab->interface == &popup_grab_interface) {
- wl_pointer_end_grab(grab->pointer);
+ weston_pointer_end_grab(grab->pointer);
shseat->popup_grab.client = NULL;
shseat->popup_grab.grab.interface = NULL;
assert(!wl_list_empty(&shseat->popup_grab.surfaces_list));
if (shseat->seat->pointer.button_count > 0)
shseat->popup_grab.initial_up = 0;
- wl_pointer_start_grab(seat->pointer, &shseat->popup_grab.grab);
+ weston_pointer_start_grab(seat->pointer, &shseat->popup_grab.grab);
}
wl_list_insert(&shseat->popup_grab.surfaces_list, &shsurf->popup.grab_link);
}
wl_list_remove(&shsurf->popup.grab_link);
wl_list_init(&shsurf->popup.grab_link);
if (wl_list_empty(&shseat->popup_grab.surfaces_list)) {
- wl_pointer_end_grab(shseat->popup_grab.grab.pointer);
+ weston_pointer_end_grab(shseat->popup_grab.grab.pointer);
shseat->popup_grab.grab.interface = NULL;
}
}
}
static void
-rotate_grab_motion(struct wl_pointer_grab *grab,
+rotate_grab_motion(struct weston_pointer_grab *grab,
uint32_t time, wl_fixed_t x, wl_fixed_t y)
{
struct rotate_grab *rotate =
container_of(grab, struct rotate_grab, base.grab);
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
struct shell_surface *shsurf = rotate->base.shsurf;
struct weston_surface *surface;
float cx, cy, dx, dy, cposx, cposy, dposx, dposy, r;
}
static void
-rotate_grab_button(struct wl_pointer_grab *grab,
- uint32_t time, uint32_t button, uint32_t state_w)
+rotate_grab_button(struct weston_pointer_grab *grab,
+ uint32_t time, uint32_t button, uint32_t state_w)
{
struct rotate_grab *rotate =
container_of(grab, struct rotate_grab, base.grab);
- struct wl_pointer *pointer = grab->pointer;
+ struct weston_pointer *pointer = grab->pointer;
struct shell_surface *shsurf = rotate->base.shsurf;
enum wl_pointer_button_state state = state_w;
}
}
-static const struct wl_pointer_grab_interface rotate_grab_interface = {
+static const struct weston_pointer_grab_interface rotate_grab_interface = {
noop_grab_focus,
rotate_grab_motion,
rotate_grab_button,
notify_pointer_position(struct weston_test *test, struct wl_resource *resource)
{
struct weston_seat *seat = get_seat(test);
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
wl_test_send_pointer_position(resource, pointer->x, pointer->y);
}
{
struct weston_test *test = resource->data;
struct weston_seat *seat = get_seat(test);
- struct wl_pointer *pointer = seat->seat.pointer;
+ struct weston_pointer *pointer = seat->seat.pointer;
test->compositor->focus = 1;