[gnome-shell] st/widget: Switch to the new API to get actor from inputdevice



commit fc1d1e536287b6e604dbcc38fc58c0474631b618
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Oct 15 17:00:16 2020 +0200

    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>

 src/st/st-widget.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index bfce545722..2ee74af081 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -1865,12 +1865,17 @@ void
 st_widget_sync_hover (StWidget *widget)
 {
   ClutterInputDevice *pointer;
+  ClutterActor *stage;
   ClutterActor *pointer_actor;
   ClutterSeat *seat;
 
   seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
   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)))
     st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));
   else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]