Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/window.c:
return; xinerama_get_fullscreen_monitors( &data->rects.visible, monitors );
- memcpy( data->desired_state.monitors, monitors, sizeof(monitors) );
- if (!memcmp( old_monitors, monitors, sizeof(monitors) )) return; /* states are the same, nothing to update */
The reason why something like this didn't exist before is that after the monitor changes, the old Xinerama monitor index might be different than the new ones. For example, changing the secondary monitor from right to left and then making the secondary monitor primary using the host system's utilities. We can probably invalidate the old monitor Xinerama indices after a device change.