Skip to content

Conversation

@excitoon
Copy link

@excitoon excitoon commented May 6, 2025

Progress on #53 (fixes some cases)

@excitoon excitoon changed the title Fixed Retina detection for mirrorred monitors Fixed Retina detection for mirrored monitors May 6, 2025
@drov0
Copy link
Owner

drov0 commented May 8, 2025

Hi ! Thanks for your contribution, I'm sorry I didn't catch the mss issue I don't own a mac. Is there a way to detect retina without calling a subprocess ? I'm not a big fan of calling external processes (because with some aliasing you could have the lib call a different binary and it's a security issue)

@excitoon
Copy link
Author

excitoon commented Jun 6, 2025

@drov0 actually it's quite worse than that, you can have one Retina monitor and one regular. I guess you need to design an API for multi-monitor setups for a start 🤷‍♂️

@excitoon
Copy link
Author

excitoon commented Jun 6, 2025

>>> import AppKit
>>> [(s.backingScaleFactor(), s.frame().size, s.frame().origin) for s in AppKit.NSScreen.screens()]
[(1.0, <CoreFoundation.CGSize width=3840.0 height=1080.0>, <CoreFoundation.CGPoint x=0.0 y=0.0>)]

I had to restart Python to get changes :( (however, the current solution has the same issue):

>>> import AppKit
>>> [(s.backingScaleFactor(), s.frame().size, s.frame().origin) for s in AppKit.NSScreen.screens()]
[(2.0, <CoreFoundation.CGSize width=1512.0 height=982.0>, <CoreFoundation.CGPoint x=0.0 y=0.0>)]

@excitoon
Copy link
Author

excitoon commented Jun 6, 2025

https://stackoverflow.com/a/69637863

Basically, we need some approach how to integrate this code into the library, unfortunately.

@excitoon
Copy link
Author

excitoon commented Jun 6, 2025

Personally, I would stick to polling separate processes, with Python or not (for example, you can have some manual update method).

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