Skip to content

Commit

Permalink
ALL: Added saveSetup() and restoreSetup(). Fixed / Improved watchdog …
Browse files Browse the repository at this point in the history
…(especially in Linux). Fixed / improved setPosition() method

LINUX: Added ewmhlib as separate module. Fixed watchdog (freezing randomly invoking screen_resources and get_output_info), fixed workarea crash (some apps/environments do not set it), improved to work almost fine in Manjaro/KDE, avoid crashing in Wayland for "fake" :1 display (though module won't likely work)
WIN32: Fixed dev.StateFlags returning weird values for multi-monitor. Fixed GetAwarenessFromDpiAwarenessContext not supported on Windows Server
MACOS: Replaced display-manager-lib by other alternatives which seem to work in several macOS versions (brightness only) Added setScale() method (using a workaround). Added wakeup feature to turnOn() method
  • Loading branch information
Kalmat committed Apr 17, 2024
1 parent 43f8ad6 commit 806e2b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pymonctl/_pymonctl_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,8 @@ def _XgetAllMonitors(name: str = ""):
monitors.append((display, screen, root, monitor, monName))
else:
stopSearching = False
for rootData in getRoots():
roots: List[Tuple[Xlib.display.Display, Struct, XWindow]] = getRoots()
for rootData in roots:
display, screen, root = rootData
try:
mons = randr.get_monitors(root).monitors
Expand Down Expand Up @@ -946,7 +947,8 @@ def _RgetMonitorsInfo(activeOnly: bool = True):
def _XgetAllOutputs(name: str = ""):
outputs: List[Tuple[Xlib.display.Display, Xlib.protocol.rq.Struct, Xlib.xobject.drawable.Window,
int, GetOutputInfo]] = []
for rootData in getRoots():
roots: List[Tuple[Xlib.display.Display, Struct, XWindow]] = getRoots()
for rootData in roots:
display, screen, root = rootData
res = randr.get_screen_resources_current(root)
for output in res.outputs:
Expand Down

0 comments on commit 806e2b6

Please sign in to comment.