examples/monitor_list: properly print output#2658
Merged
kchibisov merged 3 commits intorust-windowing:masterfrom Jan 30, 2023
Merged
examples/monitor_list: properly print output#2658kchibisov merged 3 commits intorust-windowing:masterfrom
kchibisov merged 3 commits intorust-windowing:masterfrom
Conversation
Member
|
That looks better, but I'd suggest to separate the outputs(with at least a new line) and maybe print the video modes as well, the example will print more stuff about the monitors, so it could be used to help debugging issues. Formatting the way sway does would be nice, but I don't really insist, it's just hard to grasp because everything is on the same level. Maybe the output of sway's output commands could inspire you. |
filnet
reviewed
Jan 29, 2023
| for mon in window.available_monitors() { | ||
| print_info(mon); | ||
| } | ||
| if let Some(mon) = window.primary_monitor() { |
Contributor
There was a problem hiding this comment.
It is not very clear that the last monitor is the primary monitor (if there is one...).
I suggest to highlight the primary monitor when looping over all the monitors.
Contributor
Author
|
Updated: |
kchibisov
approved these changes
Jan 30, 2023
13 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CHANGELOG.mdif knowledge of this change could be valuable to usersThe old version of
examples/monitor_list.rssimply used the debug repr ofMonitorHandle, which on Wayland looks like this:Updated version prints useful, more platform consistent info: