Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/display.c:
handler->free_monitors(monitors, monitor_count);
settings_handler.get_current_mode( adapters[adapter].id, ¤t_mode );
if (!settings_handler.get_modes( adapters[adapter].id, EDS_ROTATEDMODE, &modes, &mode_count ))
/* Get the settings handler id for the adapter */
snprintf( buffer, sizeof(buffer), "\\\\.\\DISPLAY%d", adapter + 1 );
asciiz_to_unicode( devname, buffer );
if (!settings_handler.get_id( devname, is_primary, &settings_id )) break;
Yes, this is overlooked. When using both the XRandR 1.4 display device handler and settings handler, their IDs are compatible but not in other cases. To avoid future confusion, maybe it's better to introduce types for adapter device ID and adapter setting ID. Or maybe adding comments in struct x11drv_settings_handler and struct x11drv_display_device_handler about not to mix IDs is enough.