Wayland: Don't insert the same monitor twice if the done event for an output is sent twice

This commit is contained in:
Kovid Goyal 2019-06-07 13:38:44 +05:30
parent e846bc9308
commit 9c8cf04a80
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

3
glfw/wl_monitor.c vendored
View File

@ -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);
}