mutter does not always destroy virtual monitors, when respective PW stream and DBus interface for stream is detroyed
Affected version: mutter/main, g-s/main
Reproduction steps:
- Build g-r-d with multimonitor handling (that is with gnome-remote-desktop!186 (merged))
- Connect with an RDP client, while allowing multimon configurations to be used in the RDP client (when using xfreerdp, use the options
/dynamic-resolution /f /multimon
for this; when using mstsc, tick the respective multimon checkbox in the display tab). - Open in the remote desktop session the display panel in g-c-c (to have the monitor number indicators)
- Change the display configuration by e.g. removing one monitor on the client side. g-r-d receives a new config via the DISP channel and applies it.
- Add the monitor again, so that the second monitor is recreated on the mutter side again
- Remove the monitor again
Observation: You should now have only 1 monitor in the remote desktop session - in theory. In reality, you have now 2 or 3 monitors in your session. This is easily visible, since your current monitor is not the primary anymore (thus, there must be at least another one here) + the monitor count in the top left corner (due to having the display panel open in g-c-c) is now 2 or 3.
It may be the case, that this bug resolves itself by closing the whole remote desktop session. But this is just a guess (and wouldn't solve the original problem anyway).