diff --git a/docs/changelog.rst b/docs/changelog.rst index 47250e892..2227626de 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -124,6 +124,9 @@ To update |kitty|, :doc:`follow the instructions `. - Fix the selection getting changed if the screen contents scroll while the selection is in progress (:iss:`3431`) +- X11: Fix :opt:`resize_in_steps` being applied even when window is maximized + (:iss:`3473`) + 0.19.3 [2020-12-19] ------------------- diff --git a/glfw/x11_window.c b/glfw/x11_window.c index 398e3030a..f3648efc8 100644 --- a/glfw/x11_window.c +++ b/glfw/x11_window.c @@ -225,13 +225,14 @@ static void sendEventToWM(_GLFWwindow* window, Atom type, // Updates the normal hints according to the window settings // -static void updateNormalHints(_GLFWwindow* window, int width, int height) +static void +updateNormalHints(_GLFWwindow* window, int width, int height) { XSizeHints* hints = XAllocSizeHints(); if (!window->monitor) { - if (window->resizable) + if (window->resizable && !window->x11.maximized) { if (window->minwidth != GLFW_DONT_CARE && window->minheight != GLFW_DONT_CARE) @@ -1744,6 +1745,9 @@ static void processEvent(XEvent *event) if (window->x11.maximized != maximized) { window->x11.maximized = maximized; + int width, height; + _glfwPlatformGetWindowSize(window, &width, &height); + updateNormalHints(window, width, height); _glfwInputWindowMaximize(window, maximized); } }