X11: Fix resize_in_steps being applied even when window is maximized

Fixes #3473
This commit is contained in:
Kovid Goyal 2021-04-13 12:48:23 +05:30
parent 75d067e411
commit 111c123435
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 9 additions and 2 deletions

View File

@ -124,6 +124,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- 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]
-------------------

8
glfw/x11_window.c vendored
View File

@ -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);
}
}