Wayland: Fix maximizing the window on a compositor that does not provide server side window decorations, such a GNOME or Weston not working

Fixes #1662
This commit is contained in:
Kovid Goyal 2019-05-29 17:07:42 +05:30
parent 2920638a3d
commit f33205a490
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 10 additions and 0 deletions

View File

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

6
glfw/wl_window.c vendored
View File

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