mirror of
https://github.com/brl/mutter.git
synced 2025-05-17 04:24:55 +00:00
state: Fix warping to the current state during transitions
If you warp to a state, it should be immediately set. Check if the animation is in progress when warping to a state and don't short-circuit in the already-set check if we're not animating.
This commit is contained in:
parent
35c35de55c
commit
bfc1583d76
@ -507,7 +507,11 @@ clutter_state_change (ClutterState *state,
|
|||||||
|
|
||||||
if (target_state_name == priv->target_state_name)
|
if (target_state_name == priv->target_state_name)
|
||||||
{
|
{
|
||||||
/* Avoid transitioning if the desired state is already current */
|
/* Avoid transitioning if the desired state is already current,
|
||||||
|
* unless we're warping to it and the state transition is in
|
||||||
|
* progress (in that case, immediately warp to the state).
|
||||||
|
*/
|
||||||
|
if (!clutter_timeline_is_playing (priv->timeline) || animate)
|
||||||
return priv->timeline;
|
return priv->timeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user