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

better monitor matching between win32-display-data and gdk4.Display.monitors() #7

Closed
codyduong opened this issue Jul 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@codyduong
Copy link
Owner

codyduong commented Jul 14, 2024

// Find matching MonitorTemp based on MonitorGeometry
if let Some(other_monitor) = other_monitors
.iter()
.find(|&m| Into::<MonitorGeometry>::into(m.geometry()) == geometry)
{
Some(Monitor {

yeah this doesn't seem stable? unless we can gurantee gdk4 displays enumerate in the same manner as win32-display-data?

@codyduong codyduong added the bug Something isn't working label Jul 14, 2024
@codyduong codyduong self-assigned this Jul 14, 2024
@codyduong codyduong changed the title better monitor matching between win32-display-data and gdk4.Display better monitor matching between win32-display-data and gdk4.Display.monitors() Jul 14, 2024
@codyduong
Copy link
Owner Author

Wait, no I wrote this write see here:

impl PartialEq for MonitorGeometry {
fn eq(&self, other: &Self) -> bool {
self.x == other.x && self.y == other.y && self.width == other.width && self.height == other.height
}
}

Maybe it is possible this breaks in some edge-cases?

@codyduong codyduong added this to the 0.1.0 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant