feat(window_manager): add get_display_topology_signature for dynamic monitor and resolution change detection
This commit is contained in:
@@ -349,6 +349,16 @@ class WindowManager:
|
|||||||
user32.EnumDisplayMonitors(0, None, MONITORENUMPROC(enum_mon_proc), 0)
|
user32.EnumDisplayMonitors(0, None, MONITORENUMPROC(enum_mon_proc), 0)
|
||||||
return monitors
|
return monitors
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_display_topology_signature(cls) -> tuple:
|
||||||
|
"""
|
||||||
|
Returns a hashable signature representing current displays, resolutions, and work areas.
|
||||||
|
Used to detect dynamic monitor connection, disconnection, or resolution adjustments.
|
||||||
|
"""
|
||||||
|
monitors = cls.get_monitors()
|
||||||
|
vd = cls.get_virtual_desktop_bounds()
|
||||||
|
return (vd, tuple((m.handle, m.is_primary, m.rect, m.work_area) for m in monitors))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_floor_y_at(cls, x: float, cat_height: int) -> float:
|
def get_floor_y_at(cls, x: float, cat_height: int) -> float:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user