File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ See Git checking messages for full history.
44
55## 8.0.4 (2023/xx/xx)
66- Linux: add failure handling to ` XOpenDisplay() ` call (fixes #246 )
7+ - Mac: tiny improvement in moniors finding
78- Windows: refactored how internal handles are stored (fixes #198 )
89- Windows: removed side effects when leaving the context manager, resources are all freed
910- CI: run tests via xvfb-run on GitHub Actions (#248 )
Original file line number Diff line number Diff line change @@ -133,14 +133,13 @@ def _monitors_impl(self) -> None:
133133 display_count = c_uint32 (0 )
134134 active_displays = (c_uint32 * self .max_displays )()
135135 core .CGGetActiveDisplayList (self .max_displays , active_displays , ctypes .byref (display_count ))
136- rotations = {0.0 : "normal" , 90.0 : "right" , - 90.0 : "left" }
137136 for idx in range (display_count .value ):
138137 display = active_displays [idx ]
139138 rect = core .CGDisplayBounds (display )
140139 rect = core .CGRectStandardize (rect )
141140 width , height = rect .size .width , rect .size .height
142- rot = core .CGDisplayRotation (display )
143- if rotations [ rot ] in [ "left " , "right" ]:
141+ if core .CGDisplayRotation (display ) in { 90.0 , - 90.0 }:
142+ # {0.0: "normal ", 90.0: "right", -90.0: "left"}
144143 width , height = height , width
145144 self ._monitors .append (
146145 {
You can’t perform that action at this time.
0 commit comments