backends: Move warp_pointer() to ClutterSeat

The onscreen pointer sprite is a per-seat element, so it makes sense
to move pointer warping over there too.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/852
This commit is contained in:
Carlos Garnacho
2019-10-09 18:01:34 +02:00
parent 9da275cf73
commit 1e9682b417
12 changed files with 67 additions and 92 deletions

View File

@ -546,3 +546,13 @@ clutter_seat_compress_motion (ClutterSeat *seat,
if (seat_class->compress_motion)
seat_class->compress_motion (seat, event, to_discard);
}
void
clutter_seat_warp_pointer (ClutterSeat *seat,
int x,
int y)
{
g_return_if_fail (CLUTTER_IS_SEAT (seat));
CLUTTER_SEAT_GET_CLASS (seat)->warp_pointer (seat, x, y);
}

View File

@ -106,6 +106,10 @@ struct _ClutterSeatClass
ClutterEvent *event,
const ClutterEvent *to_discard);
void (* warp_pointer) (ClutterSeat *seat,
int x,
int y);
/* Event platform data */
void (* copy_event_data) (ClutterSeat *seat,
const ClutterEvent *src,
@ -166,4 +170,9 @@ void clutter_seat_compress_motion (ClutterSeat *seat,
ClutterEvent *event,
const ClutterEvent *to_discard);
CLUTTER_EXPORT
void clutter_seat_warp_pointer (ClutterSeat *seat,
int x,
int y);
#endif /* CLUTTER_SEAT_H */