st/widget: Switch to the new API to get actor from inputdevice
clutter_input_device_get_actor() was removed in favour of clutter_stage_get_device_actor(), so use that. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1537>
This commit is contained in:
parent
8f6477be0a
commit
fc1d1e5362
@ -1865,12 +1865,17 @@ void
|
|||||||
st_widget_sync_hover (StWidget *widget)
|
st_widget_sync_hover (StWidget *widget)
|
||||||
{
|
{
|
||||||
ClutterInputDevice *pointer;
|
ClutterInputDevice *pointer;
|
||||||
|
ClutterActor *stage;
|
||||||
ClutterActor *pointer_actor;
|
ClutterActor *pointer_actor;
|
||||||
ClutterSeat *seat;
|
ClutterSeat *seat;
|
||||||
|
|
||||||
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
|
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
|
||||||
pointer = clutter_seat_get_pointer (seat);
|
pointer = clutter_seat_get_pointer (seat);
|
||||||
pointer_actor = clutter_input_device_get_actor (pointer, NULL);
|
stage = clutter_actor_get_stage (CLUTTER_ACTOR (widget));
|
||||||
|
if (!stage)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pointer_actor = clutter_stage_get_device_actor (CLUTTER_STAGE (stage), pointer, NULL);
|
||||||
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));
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user