mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-21 11:39:57 +03:00
When remembering OS window sizes for full screen windows use the size before the window became fullscreen
Fixes #4221
This commit is contained in:
parent
91a24dd2eb
commit
880de53d59
@ -135,6 +135,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
|
||||
- A new mappable action to close windows with a confirmation (:iss:`4195`)
|
||||
|
||||
- When remembering OS window sizes for full screen windows use the size before
|
||||
the window became fullscreen (:iss:`4221`)
|
||||
|
||||
|
||||
0.23.1 [2021-08-17]
|
||||
----------------------
|
||||
|
@ -929,8 +929,13 @@ process_pending_resizes(monotonic_t now) {
|
||||
|
||||
static void
|
||||
close_os_window(ChildMonitor *self, OSWindow *os_window) {
|
||||
int w = os_window->window_width, h = os_window->window_height;
|
||||
if (os_window->before_fullscreen.is_set && is_os_window_fullscreen(os_window)) {
|
||||
printf("11111111111111 w=%d h=%d bw: %d bh: %d\n", w, h, os_window->before_fullscreen.w, os_window->before_fullscreen.h);
|
||||
w = os_window->before_fullscreen.w; h = os_window->before_fullscreen.h;
|
||||
}
|
||||
destroy_os_window(os_window);
|
||||
call_boss(on_os_window_closed, "Kii", os_window->id, os_window->window_width, os_window->window_height);
|
||||
call_boss(on_os_window_closed, "Kii", os_window->id, w, h);
|
||||
for (size_t t=0; t < os_window->num_tabs; t++) {
|
||||
Tab *tab = os_window->tabs + t;
|
||||
for (size_t w = 0; w < tab->num_windows; w++) mark_child_for_close(self, tab->windows[w].id);
|
||||
|
@ -31,6 +31,7 @@ class WindowSizeData(NamedTuple):
|
||||
|
||||
def initial_window_size_func(opts: WindowSizeData, cached_values: Dict[str, Any]) -> Callable[[int, int, float, float, float, float], Tuple[int, int]]:
|
||||
|
||||
print(cached_values)
|
||||
if 'window-size' in cached_values and opts.remember_window_size:
|
||||
ws = cached_values['window-size']
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user