On Sat Aug 27 02:06:21 2022 +0000, Zhiyi Zhang wrote:
Position for monitors is at displays[display_idx].frame. I think you can split this patch into two patches. One for enumerating the current mode and the other for available modes.
I haven't checked. But can the displays from macdrv_get_displays() be detached? If it can, you should handle it as well. For example, when a Mac laptop is connected to an external monitor and the lid is closed.