On Thu Apr 6 03:14:22 2023 +0000, Zhiyi Zhang wrote:
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.
I like the idea with the separate type(s), so I have added an new commit that implements a distinct type for the settings id, for your consideration. It introduces a bit of churn but it is otherwise straightforward.
I didn't add a new type for the the device id, since that id type is designed to match the `struct gdi_adapter` id field type, so it's not directly under winex11 control. Also having just the distinct settings id type provides the guarantees we want.
(This change is not necessary for this MR, so we can include, skip or refine in another MR as preferred.)