Skip to content

X11/multiscreen: Always emit outputOrderChanged when a screen is disconnected

Marco Martin requested to merge work/cherry-pick-08174d25 into Plasma/6.2

Don't remove immediately the output from m_outputOrder. This fixes screen removal both the "normal" case and the case of last screen removed that causes the last QScreen to become ":0.0" named.

Why the current master was broken:

In X11OutputOrderWatcher when a screen is disconnected it removes immediately the screen from m_outputOrder, but then on the timecompressed check in refresh() the outputorderchanged is emitted by comparing with m_outputOrder which is "new" already, so the signal is not emitted.

This makes plasma not remove the corresponding DesktopView (and panels) staying with an inconsistent internal state, either failing screenInvariants() or ending up with wrong desktops and panels on wrong screen if invariants are disabled

CCBUG:484838

(cherry picked from commit 08174d25)

Merge request reports

Loading