mutter/clutter
Jonas Dreßler 734a185915 clutter: Only pick on motion or touch update events
Aside from ENTER/LEAVE, there are only two kinds of events that can move
the pointer, motion events and touch update events. Everything else
keeps the pointer at it's current position.

The reason we pick inside _clutter_process_event_details() is that we
want to set the event actor. Now if an event can't move the pointer, it
also can't change the event actor (well, it can subsequently by
triggering changes to the scenegraph, but that's handled elsewhere), so
there's no need to pick a new event actor when we get those events.
Instead, simply reuse the actor that's already associated with the
current input device as the event actor for non MOTION/TOUCH_UPDATE
events.

Events where a device or a touchpoint goes away (like DEVICE_REMOVED or
TOUCH_END/CANCEL) also affect picking, they don't need a repick, but
instead the actor associated with the device/touchpoint needs to be
unassociated. This is ensured by invoking remove_device_for_event() on
those events and will not be affected by this change.

This should improve performance while scrolling quite a bit, since
scroll events come in unthrottled and we now no longer do a repick on
each one of those.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1729>
2021-02-15 12:24:49 +00:00
..
clutter clutter: Only pick on motion or touch update events 2021-02-15 12:24:49 +00:00
.gitignore clutter: Remove clutter specific version 2018-11-06 17:17:36 +01:00
meson.build clutter: Include semi private cogl API 2020-07-02 19:36:50 +02:00