-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fix toplevel window resize pingpong #3575
Conversation
auto const should_resize = | ||
(!impl->requested_size && impl->window_size != content_size) || // No requested resize, current size is different | ||
(impl->requested_size && impl->requested_size != content_size && impl->window_size != content_size); // both requested and current sizes are different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this approach is wrong. In essence, it is guessing whether the client has reacted to a configure event by looking at the current size. That will never work for all cases.
As we have sent a configure, we should be tracking the ack_configure (similar to the layer-shell logic you just fixed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(And, yes making the test more complex is tempting. I fell for it when I looked at #3040 a year ago)
c219039
to
088fc0b
Compare
Since `requested_size` helps implement a sort of double buffering, it should be cleared whenever we "commit" a new value.
088fc0b
to
1307cf4
Compare
So I think the "loop" was intentional, but the guard clause doesn't work because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As previously discussed, I don't think this is right, but it does improve things and doesn't seem to cause additional problems. (In particular, canonical/ubuntu-frame-osk#58 remains fixed.)
(I have a suspicion that there may be more conflation of window_size
and content_size
around that needs resolving for SSD, but that's out of scope for this PR)
This reverts commit 2d02497.
closes #3573.