mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
734a185915
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> |
||
---|---|---|
.. | ||
clutter | ||
.gitignore | ||
meson.build |