mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 10:51:55 +00:00
Change docs for resize kludge on Cocoa
This commit is contained in:
parent
66dbdf4b40
commit
bbeb08ba08
1 changed files with 9 additions and 9 deletions
18
kitty/glfw.c
18
kitty/glfw.c
|
|
@ -136,17 +136,17 @@ framebuffer_size_callback(GLFWwindow *w, int width, int height) {
|
|||
window->has_pending_resizes = true; global_state.has_pending_resizes = true;
|
||||
window->last_resize_event_at = monotonic();
|
||||
#ifdef __APPLE__
|
||||
// Cocoa starts a sub-loop inside wait events which means main_loop
|
||||
// stays stuck and no rendering happens. This causes the window to be
|
||||
// blank. This is particularly bad for semi-transparent windows since
|
||||
// they are rendered as invisible, so for that case we manually render.
|
||||
if (global_state.callback_os_window->is_semi_transparent) {
|
||||
make_os_window_context_current(global_state.callback_os_window);
|
||||
blank_os_window(global_state.callback_os_window);
|
||||
swap_window_buffers(global_state.callback_os_window);
|
||||
// On cocoa request_tick_callback() does not work while the window
|
||||
// is being resized, because that happens in a sub-loop. With semi-transparent
|
||||
// windows that is a problem as the scaled background gets blended into
|
||||
// the final background, so we explicitly blank the window here.
|
||||
if (window->is_semi_transparent) {
|
||||
make_os_window_context_current(window);
|
||||
blank_os_window(window);
|
||||
swap_window_buffers(window);
|
||||
}
|
||||
#endif
|
||||
request_tick_callback();
|
||||
request_tick_callback();
|
||||
} else log_error("Ignoring resize request for tiny size: %dx%d", width, height);
|
||||
global_state.callback_os_window = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue