-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Screens API refactor #16295
Merged
Merged
Screens API refactor #16295
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a260fb4
Draft new API
maxkatz6 0f20b9e
Push reusable ScreensBaseImpl implementation
maxkatz6 2457e5f
Fix tests and stubs
maxkatz6 441857b
Update ScreensPage sample to work on mobile + show new APIs
maxkatz6 11cab6b
Reimplement Windows ScreensImpl, reuse existing screens in other plac…
maxkatz6 8a1f555
Make X11 project buildable, don't utilize new APIs yet
maxkatz6 de8e877
Reimplement macOS Screens API, differenciate screens by CGDirectDispl…
maxkatz6 a14f375
Fix build
maxkatz6 62d5058
Adjust breaking changes file (none affect users)
maxkatz6 557ca54
Merge branch 'master' into screens-api-refactor
maxkatz6 4f7b8d8
Fix missing macOS Screen.DisplayName
maxkatz6 fd1b5c2
Add more tests + fix screen removal
maxkatz6 c16f5ef
Add screens integration tests
maxkatz6 4b11e53
Use hash set with comparer when removing screens
maxkatz6 c683f10
Merge branch 'master' into screens-api-refactor
maxkatz6 5e4d96d
Make screenimpl safer on macOS as per review
maxkatz6 cf1c184
Replace UnmanagedCallersOnly usage with source generated EnumDisplayM…
maxkatz6 4e9e8ff
Remove unused dllimport
maxkatz6 c04c15b
Only implement GetHashCode and Equals on PlatformScreen subclass, wit…
maxkatz6 ebe1e5c
Merge branch 'master' into screens-api-refactor
maxkatz6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
|
||
|
||
#include "common.h" | ||
#include "menu.h" | ||
#include "KeyTransform.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does anybody remember why we set scaling to 1? Instead of using an actual value (more likely between 2 and 3 for most main displays). MacOS.
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.
Our Screen API reports layout scaling, not DPI. macOS always uses logical coordinates for window positioning, so the reported value is 1.
We could extend the API to report both.
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.
Is it used anywhere like that? It's also not intuitive.
Normally people would use Window.DesktopScaling for that.
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.
Other implementations like qtbase and chromium just return dpi scaling, not layout.
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.
Will keep it as is for now