Skip to content

clutter: Set event as current_event when going through event filters

With the introduction of untrottled event delivery to wayland clients, we moved the _clutter_event_process_filters() call outside of _clutter_process_event(). This also moved the processing of event filters outside of the timespan where the event is added to Clutters current_event stack, making Clutter.get_current_event() no longer available to anything happening inside mutters event filter.

One thing that happens in mutters event filter is detecting and triggering keybindings like the alt-tab switcher. Now the alt-tab switcher has a special case where it finishes and activates a window right when the keybinding gets activated, relying on the current event time as the timestamp to activate the window.

Now since the current event time is no longer available from inside mutters event filter, we'd pass 0 to meta_window_activate(), causing mutter to send a notification instead of actually activating the window.

To fix this, also set a current_event for the ClutterContext when going through event filters, this makes sure Clutter.get_current_event_time() works when called inside keybinding handlers.

Merge request reports