Code review comment for lp://staging/~nick-dedekind/unity8/sidestage-restoreOnRotation

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> So spreadDelegate.stage means stage where the surface currently is in, whereas
> you use WindowStateStorage for holding the stage where the *user* wants the
> surface to be in (preferred/selected stage).
>
> That's misuse of WindowStateStorage.
>
> It's like you saving the surface geometry into WindowStateStorage on every
> single window resize.
>
> The purpose of WindowStateStorage is to store the last window state right
> before it's gone. So that when this application is launched again (seconds,
> minutes, months or years later), its window starts with the same state that it
> had when it was last used.

No, it's called "window state storage". It's storing whatever state you want it to store(last/preferred).
The fact that we use it to store the last position/geometry is a implementation decision of that use case.

« Back to merge proposal