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

Monitor name for some platforms (X11, Wayland and Windows) #31

Merged
merged 4 commits into from
Mar 3, 2024

Conversation

SergioRibera
Copy link
Contributor

@SergioRibera SergioRibera commented Feb 17, 2024

This PR contains what is necessary for the DislpayInfo structure to provide also the name of the monitors that are obtained.

At the moment I did not find how to get the display name in mac, so this implementation is pending.

Note

The cost of this implementation is to lose the Copy that the DisplayInfo structure had.

The decision to implement the from_name function in the DisplayInfo implementation was because it is not a function that requires a different implementation per platform, so a generic function for everyone was sufficient.

@nashaofu
Copy link
Owner

You may make changes according to this, and I also plan to align the relevant APIs with this library in the future. https://github.com/nashaofu/xcap/blob/master/src/monitor.rs#L33

@SergioRibera
Copy link
Contributor Author

I was watching how you did it in that library that by the way I also use it, hahaha, but I wanted to talk about it because forcing that way the name of the monitors doesn't seem right to me, although it is a better alternative to having nothing, I hope the changes I'm proposing will be useful :D

@SergioRibera
Copy link
Contributor Author

By the way, regarding what you mentioned about xcap, I can help you with a refactoring PR for display-info, just let me know and I'll get on it

@nashaofu nashaofu merged commit 690f664 into nashaofu:master Mar 3, 2024
3 checks passed
@SergioRibera SergioRibera deleted the add_name branch June 9, 2024 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants