Don't remove an existing monitor from an output if another monitor is added
In commit 7e1f86d4 monitor support was added to randr. At this time it seemed to be reasonable not to have more than one (virtual) monitor on a particular physical display. The code was never changed since.
Nowadays, extremely large displays exists (4k displays, ultra-wide displays). In some use cases it makes sense to split these large physical displays into multiple virtual monitors. An example are ultra-wide screens that can be split into 2 monitors. The change in this commit makes this work.
Besides that, removing a monitor in a function that is called "RRMonitorAdd" is bad practice and causes unexpected behaviour.
More information and discussion can be found at https://gitlab.gnome.org/GNOME/gtk/-/issues/2013#note_1564528 .
Are there possible impact to people that rely on this feature?
Potentially, that change breaks scripts that adds a monitor to a display where already a monitor exists. In my opinion it is very unlikely that such situations exists. There may be scripts that add a single monitor to a screen so that the monitor has a name different from the implicit default monitor name that is assigned if no user defined monitor is added to a screen. This still works as before with my change. Besides that, it is always possible to delete existing monitors with randr/xrandr.