Wayland: Don't insert the same monitor twice if the done event for an output is sent twice
This commit is contained in:
parent
e846bc9308
commit
9c8cf04a80
3
glfw/wl_monitor.c
vendored
3
glfw/wl_monitor.c
vendored
@ -85,6 +85,9 @@ static void outputHandleMode(void* data,
|
||||
static void outputHandleDone(void* data, struct wl_output* output)
|
||||
{
|
||||
struct _GLFWmonitor *monitor = data;
|
||||
for (int i = 0; i < _glfw.monitorCount; i++) {
|
||||
if (_glfw.monitors[i] == monitor) return;
|
||||
}
|
||||
|
||||
_glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user