Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I expected setting transformations and setting size to be committed at the same time #3699

Open
mattkae opened this issue Dec 13, 2024 · 2 comments
Labels

Comments

@mattkae
Copy link
Contributor

mattkae commented Dec 13, 2024

This is a very "matt" problem, but here's the situation.

In my animation code, I want to "scale" a rectangle so that it animates to its final width. An example would be if the width was growing from 50px to 100px. I would set the width to 100px immediately, but then interpolate the scale form 50% to 100% over some time so that the window appears to grow.

However, this always leaves an artifact because the following happens:

  1. Width is set to 100px
  2. Transformation is set to scale the width at 50%
  3. Re-render happens with the width of the renderable still at 50px but with a transformation at 50%

The issue here is that I have no way to confirm when the surface processed my request to change its size, so I end up rerendering too early.

So my questiojn is: can mir ensure that the setting of the size and transform happen in lock step?

@mattkae mattkae added the bug label Dec 13, 2024
@AlanGriffiths
Copy link
Collaborator

Just to note that there's a wider synchronisation problem as we have to track what the client requests, what window management dictates, and what the client does. (None of which is guaranteed to be consistent)

@mattkae
Copy link
Contributor Author

mattkae commented Dec 16, 2024

Just to note that there's a wider synchronisation problem as we have to track what the client requests, what window management dictates, and what the client does. (None of which is guaranteed to be consistent)

Yes I'm just going down the rabbit hole of this now. It's a bit painful, given that every client can ignore your requests. I often find that the best I can do is a "best effort" based off of what the client informs me about itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants