-
Notifications
You must be signed in to change notification settings - Fork 104
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
Make server-side decorations scale aware #3153
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3153 +/- ##
========================================
Coverage 77.79% 77.79%
========================================
Files 1064 1074 +10
Lines 74479 74981 +502
========================================
+ Hits 57938 58333 +395
- Misses 16541 16648 +107 ☔ View full report in Codecov by Sentry. |
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.
This works and looks fine for the case when outputs remain as configured on startup. But the scale can be reconfigured dynamically (e.g. by updating a "static" .display
configuration).
The msd::BasicManager
(or setup) likely needs to register a DisplayConfigurationObserver
to track scale changes.
1546c90
to
baed210
Compare
While this solution seems to work well, it differs from my initial attempt. Initially, I tried rebuilding all decorations when the scale changed, but the behavior was not as I expected. When a window surface is undecorated, the new decoration appears detached from the window, as if the decoration surface is no longer a child of the window surface. I'd like to continue investigating this behavior in order to understand what is causing it. In summary, the current implementation is functional, but if I can fix this new issue I can propose an alternative approach that avoids requiring classes derived from |
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 tried rebuilding all decorations when the scale changed, but the behavior was not as I expected
That sounds like a wrong approach: rescaling ought to be less work than tearing down and rebuilding
baed210
to
359a174
Compare
I've also changed the initialization of |
@hbatagelo sorry for the delay reviewing - I ran into a problem (#3165) while testing |
No problem. Feel free to postpone the review until #3165 is resolved. |
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.
Thanks! Looks good now
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.
Fixes #1369.
The decoration builder now selects the maximum scale factor among all display outputs, passing it to
msd::BasicDecoration
andmsd::Renderer
to create buffers with a resolution that ensures sharp-looking decorations on all outputs.