Could Someone Give me advice on Optimizing GLFW for Multi Monitor Support in Cross-Platform Applications?

Hello there,

I have been working on a cross platform application using GLFW and have encountered some challenges with multi monitor support. My application needs to handle various display configurations gracefully; but I am noticing inconsistent behavior across different operating systems and hardware setups.

I have noticed that the number of monitors detected and their attributescan vary significantly depending on the OS. On Windows; for instance; I sometimes get different results compared to macOS and Linux. What are the best practices for ensuring consistent monitor detection across platforms? :thinking: :thinking:

Transitioning to fullscreen mode and back seems to cause flickering and other visual artifacts, particularly when dealing with multiple monitors. I am using glfwSetWindowMonitor to switch modes; but the experien;ce is not as smooth as I would like. Are there any specific techniques or workarounds that can help minimize these issues? :thinking:

My application needs to handle cases where monitors are connected or disconnected while running. Currently; I use glfwSetMonitorCallback to detect these events; but handling them without disrupting the user experience has been tricky.

Also, I have gone through this post; https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw-minitab/ which definitely helped me out a lot.

High-DPI displays; especially on macOS; present another layer of complexity. The scaling factors and different resolutions sometimes result in UI elements not appearing correctly. How can I ensure that my application looks consistent and sharp across all types of displays?

Thank you in advance for your help and assistance. :innocent: