From fc2eb3de8f81c6d6c95b2d63728ec8b8dec5fbf6 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 22 Dec 2017 17:55:43 +0100 Subject: [PATCH] Handle maximized size correctly --- src/wl_window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wl_window.c b/src/wl_window.c index 80fa34b0c..2b70dd75f 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -58,6 +58,12 @@ static void handleConfigure(void* data, if (!window->monitor) { + if (window->decorated) + { + width -= 2 * _GLFW_DECORATION_WIDTH; + height -= _GLFW_DECORATION_TOP + _GLFW_DECORATION_WIDTH; + } + if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE) { aspectRatio = (float)width / (float)height;