If no monitor is explicitly specified as a parameter, the expected behavior is that toggling fullscreen uses the same monitor the window was already on (other sw displays behave this way).
GLFW instead picks a "primary" monitor and always uses that one. This is even worse on Wayland, since there is no concept of primary/secondary monitors, so the monitor picked is unpredictable.
Unfortunately, there currently doesn't seem to be a way to fix this as GLFW doesn't provide any way to query which monitor to use (glfwGetWindowMonitor works only when the window is already fullscreen).
If no monitor is explicitly specified as a parameter, the expected behavior is that toggling fullscreen uses the same monitor the window was already on (other sw displays behave this way).
GLFW instead picks a "primary" monitor and always uses that one. This is even worse on Wayland, since there is no concept of primary/secondary monitors, so the monitor picked is unpredictable.
Unfortunately, there currently doesn't seem to be a way to fix this as GLFW doesn't provide any way to query which monitor to use (glfwGetWindowMonitor works only when the window is already fullscreen).