Skip to content
Commit f6a13ef7 authored by Jonas Ådahl's avatar Jonas Ådahl
Browse files

monitor-config-manager: Handle multiple builtin panels gracefully

While multiple built-in panels isn't actually supported in any
meaningful manner, if we would ever end up with such a situation, e.g.
due to kernel bugs[0], we shouldn't crash when trying to set an
'external only' without any external monitors.

While we could handle this with more degraded functionality (e.g. don't
support the 'switch' method of monitor configuration at all), handle it
by simply not trying to switch to external-only when there are no,
according to the kernel, external monitors available. This would e.g.
still allow betwene 'mirror-all', and 'linear' switches.

The crash itself was disguised as an arbitrary X11 BadValue error, due
to mutter trying to resize the root window to 0x0, as the monitor
configuration that was applied consisted of zero logical monitors, thus
was effectively empty.

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1896904

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1899260


(cherry picked from commit f6db6cd2)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1608>
parent a54d38e0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment