[3.38] xwayland: Set xrandr primary output
To find XWayland output that should be the primary one, iterate through all XWayland outputs, and compare their geometry to the geometry of the primary logical monitor.
To avoid possible race conditions (Mutter's monitor configuration already updated, but Xrandr not yet), set the output both after Randr notifications and after 'monitors-changed' signal.
Signed-off-by: Aleksandr Mezin mezin.alexander@gmail.com Part-of: !1558 (merged)
(cherry picked from commit 4f544b63)