Add some debug prints

This commit is contained in:
Kovid Goyal 2026-03-03 08:39:12 +05:30
parent ad560715a6
commit b8faada186
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -352,7 +352,9 @@ cocoa_out_of_sequence_render(OSWindow *window) {
// screen change events. Try to recover by recreating the drawable.
// See https://github.com/kovidgoyal/kitty/issues/9463
if (!current_framebuffer_is_ok()) {
debug_rendering("Cocoa OpenGL framebuffer broken, re-creating\n");
if (!glfwCocoaRecreateGLDrawable(window->handle) || !current_framebuffer_is_ok()) {
debug_rendering("Cocoa OpenGL framebuffer re-creation failed\n");
request_tick_callback();
return;
}
@ -361,6 +363,7 @@ cocoa_out_of_sequence_render(OSWindow *window) {
bool rendered = false;
if (window->fonts_data->sprite_map) rendered = render_os_window(window, monotonic(), true);
if (!rendered) {
debug_rendering("Cocoa out of sequence render did not happen\n");
blank_os_window(window);
swap_window_buffers(window);
}