From 11e1a2f52268a40bfeff9f9057736aa7b199da4d Mon Sep 17 00:00:00 2001 From: Kalmat Date: Thu, 18 Apr 2024 21:24:33 +0200 Subject: [PATCH] ALL: Added saveSetup() and restoreSetup(). Fixed / Improved watchdog (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 --- src/pymonctl/_pymonctl_macos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymonctl/_pymonctl_macos.py b/src/pymonctl/_pymonctl_macos.py index db0993d..fb49d7a 100644 --- a/src/pymonctl/_pymonctl_macos.py +++ b/src/pymonctl/_pymonctl_macos.py @@ -737,7 +737,7 @@ def _loadIOKit(displayID = Quartz.CGMainDisplayID()): # iokit: ctypes.CDLL = ctypes.cdll.LoadLibrary(lib) # iokit.IODisplayGetFloatParameter.argtypes = [ctypes.c_int, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p] # iokit.IODisplayGetFloatParameter.restype = ctypes.py_object - import objc # type: ignore[import-untyped] + import objc # type: ignore[import-untyped, import-not-found] iokit = AppKit.NSBundle.bundleWithIdentifier_("com.apple.framework.IOKit") functions = [ ("IOServiceGetMatchingService", b"II@"),