window: Get Backend from actor's associated context
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
This commit is contained in:
parent
b252b9585f
commit
faa0860e9d
1 changed files with 4 additions and 2 deletions
|
@ -7256,10 +7256,12 @@ window_has_pointer_wayland (MetaWindow *window)
|
|||
ClutterInputDevice *dev;
|
||||
ClutterStage *stage;
|
||||
ClutterActor *pointer_actor, *window_actor;
|
||||
ClutterContext *context;
|
||||
|
||||
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
|
||||
dev = clutter_seat_get_pointer (seat);
|
||||
stage = CLUTTER_STAGE (meta_backend_get_stage (backend_from_window (window)));
|
||||
context = clutter_actor_get_context (CLUTTER_ACTOR (stage));
|
||||
seat = clutter_backend_get_default_seat (clutter_context_get_backend (context));
|
||||
dev = clutter_seat_get_pointer (seat);
|
||||
pointer_actor = clutter_stage_get_device_actor (stage, dev, NULL);
|
||||
window_actor = CLUTTER_ACTOR (meta_window_get_compositor_private (window));
|
||||
|
||||
|
|
Loading…
Reference in a new issue