st: Use ClutterSeat to get pointer device

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
This commit is contained in:
Carlos Garnacho 2019-10-05 12:32:40 +02:00 committed by Carlos Garnacho
parent bd48b0641f
commit b86ef8cde5

View File

@ -1897,12 +1897,12 @@ st_widget_set_hover (StWidget *widget,
void void
st_widget_sync_hover (StWidget *widget) st_widget_sync_hover (StWidget *widget)
{ {
ClutterDeviceManager *device_manager;
ClutterInputDevice *pointer; ClutterInputDevice *pointer;
ClutterActor *pointer_actor; ClutterActor *pointer_actor;
ClutterSeat *seat;
device_manager = clutter_device_manager_get_default (); seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
pointer = clutter_device_manager_get_device (device_manager, VIRTUAL_CORE_POINTER_ID); pointer = clutter_seat_get_pointer (seat);
pointer_actor = clutter_input_device_get_pointer_actor (pointer); pointer_actor = clutter_input_device_get_pointer_actor (pointer);
if (pointer_actor && clutter_actor_get_reactive (CLUTTER_ACTOR (widget))) if (pointer_actor && clutter_actor_get_reactive (CLUTTER_ACTOR (widget)))
st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor)); st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));