mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 04:32:05 +00:00
was_maximized should use pre full screen state as well
This commit is contained in:
parent
df2986feb3
commit
e55739bd10
1 changed files with 7 additions and 1 deletions
|
|
@ -1374,7 +1374,13 @@ close_os_window(ChildMonitor *self, OSWindow *os_window) {
|
|||
if (os_window->handle && !global_state.is_wayland) glfwGetWindowPos(os_window->handle, &x, &y);
|
||||
bool is_layer_shell = os_window->is_layer_shell;
|
||||
bool was_maximized = false;
|
||||
if (os_window->handle && !is_layer_shell) { was_maximized = glfwGetWindowAttrib(os_window->handle, GLFW_MAXIMIZED) != 0; }
|
||||
if (os_window->handle && !is_layer_shell) {
|
||||
if (os_window->before_fullscreen.is_set && is_os_window_fullscreen(os_window)) {
|
||||
was_maximized = os_window->before_fullscreen.was_maximized;
|
||||
} else {
|
||||
was_maximized = glfwGetWindowAttrib(os_window->handle, GLFW_MAXIMIZED) != 0;
|
||||
}
|
||||
}
|
||||
destroy_os_window(os_window);
|
||||
call_boss(on_os_window_closed, "KiiiiOO", os_window->id, x, y, w, h, was_maximized ? Py_True : Py_False, is_layer_shell ? Py_True : Py_False);
|
||||
for (size_t t = 0; t < os_window->num_tabs; t++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue