diff --git a/docs/changelog.rst b/docs/changelog.rst index 7d2d61b26..b6342ba7d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -34,6 +34,10 @@ To update |kitty|, :doc:`follow the instructions `. - Linux: Automatically increase cell height if the font being used is broken and draws the underscore outside the bounding box (:iss:`690`) +- Wayland: Fix maximizing the window on a compositor that does not provide + server side window decorations, such a GNOME or Weston not working + (:iss:`1662`) + 0.14.0 [2019-05-24] --------------------- diff --git a/glfw/wl_window.c b/glfw/wl_window.c index c947f45b1..1f9521404 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -551,6 +551,12 @@ static void xdgToplevelHandleConfigure(void* data, } } window->wl.fullscreened = fullscreen; + if (maximized && !fullscreen) { + if (window->decorated && !window->wl.decorations.serverSide && window->wl.decorations.buffer) { + width -= _GLFW_DECORATION_HORIZONTAL; + height -= _GLFW_DECORATION_VERTICAL; + } + } dispatchChangesAfterConfigure(window, width, height); _glfwInputWindowFocus(window, activated); }