Skip to content

workspaceAnimation: Get time outside of the animation-complete callback

We want to use the current event time for activating the workspace, and this time is only available when calling global.get_current_time() or Clutter.get_current_event_time() from the context of an event handler.

So instead of trying to get that time when the animation has finished from the onComplete() handler, get it before and store it as a variable to use in the onComplete() handler later.

This fixes an error message when switching workspaces using the swipe gesture where MetaWorkspace complains about the 0-timestamp we pass it.

Merge request reports