GDK-X11 breaks on an xrandr 1.5 'fake monitor' use case
Steps to reproduce
My specific use case (splitting a 4k monitor into 5 'virtual monitors'). Reproducible with any split though.
xrandr --setmonitor HDMI-00 1280/266x960/200+0+0 HDMI-0
xrandr --setmonitor HDMI-01 1280/266x960/200+1280+0 none
xrandr --setmonitor HDMI-02 1280/266x960/200+2560+0 none
xrandr --setmonitor HDMI-03 1920/400x1200/250+0+960 none
xrandr --setmonitor HDMI-04 1920/400x1200/250+1920+960 none
Current behavior
gdk_display_get_n_monitors -- returns 1 (the first one).
Expected outcome (Correct in gtk 2.0)
gdk_display_get_n_monitors -- returns 5 (all of them).
See attached patch. Issue is in init_randr15, if a monitor does not have an output, it is not added to the list. Am not sure my solution is 'correct' as I'm not sure what other cases will have a monitor with no output. It simply reuses the last 'valid' output, so it should still work correctly for a case where someone splits a monitor where someone physically has two monitors. I don't see how it can break anything, though.
Commit f3f998ef exists for this case, so somebody ran into it at some point.
It may be preferable to simply save off the subpixel order of the previous output and use a default string ('None' or the like) for the name, and use that instead when output_info is NULL, but this seemed preferable as the function may, in the future, use other attributes of the output than just subpixel order.