From f51c219b1cd4b32605bdf3842d92d46fa823f3d5 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 80fa34b0..2b70dd75 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;