From a79b93f5bcf7bd76309a4234370d84d5665059d9 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 14 Nov 2013 12:59:08 +0100 Subject: [PATCH] Avoid X11 video mode setting if modes match. This matches the behavior of the Windows port. --- src/x11_monitor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/x11_monitor.c b/src/x11_monitor.c index de3287cd..48d47b4a 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -111,6 +111,9 @@ void _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired) } } + if (bestMode == ci->mode) + return; + if (monitor->x11.oldMode == None) monitor->x11.oldMode = ci->mode;