Skip to content

monitor-manager: Find active monitor when deriving global scale

When deriving the global scale directly from the current hardware state (as done when using the X11 backend) we are inspecting the logical state they had prior to the most recent hot plug. That means that a primary monitor might have been disabled, and a new primary monitor may not have been assigned yet.

Stop assuming a primary monitor has an active mode before having reconstructed the logical state by finding some active monitor if the old primary monitor was disabled. This avoids a crash when trying to derive the global scale from a disabled monitor.

Closes: #130 (closed)

Merge request reports