mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 22:24:10 +00:00
core: Move away from clutter_event_get_source()
Instead ask the stage for the target actor for the given device/sequence. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2311>
This commit is contained in:
parent
fd0e7ed2f3
commit
52002d042e
@ -87,15 +87,17 @@ get_window_for_event (MetaDisplay *display,
|
||||
{
|
||||
case META_EVENT_ROUTE_NORMAL:
|
||||
{
|
||||
ClutterActor *source;
|
||||
ClutterActor *target;
|
||||
MetaWindowActor *window_actor;
|
||||
|
||||
/* Always use the key focused window for key events. */
|
||||
if (IS_KEY_EVENT (event))
|
||||
return stage_has_key_focus () ? display->focus_window : NULL;
|
||||
|
||||
source = clutter_event_get_source (event);
|
||||
window_actor = meta_window_actor_from_actor (source);
|
||||
target = clutter_stage_get_device_actor (clutter_event_get_stage (event),
|
||||
clutter_event_get_device (event),
|
||||
clutter_event_get_event_sequence (event));
|
||||
window_actor = meta_window_actor_from_actor (target);
|
||||
if (window_actor)
|
||||
return meta_window_actor_get_meta_window (window_actor);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user