Output debug info about resized being called

This commit is contained in:
Kovid Goyal 2022-03-10 19:32:17 +05:30
parent 39d3ef6fe8
commit 1c3910de5c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 8 deletions

3
glfw/wl_init.c vendored
View File

@ -54,6 +54,8 @@
#endif
#define debug(...) if (_glfw.hints.init.debugRendering) fprintf(stderr, __VA_ARGS__);
static int min(int n1, int n2)
{
return n1 < n2 ? n1 : n2;
@ -96,7 +98,6 @@ static void pointerHandleEnter(void* data UNUSED,
if (!window)
return;
}
window->wl.decorations.focus = focus;
_glfw.wl.serial = serial;
_glfw.wl.pointerFocus = window;

10
glfw/wl_window.c vendored
View File

@ -246,8 +246,7 @@ dispatchChangesAfterConfigure(_GLFWwindow *window, int32_t width, int32_t height
}
if (scale_changed) {
if (!size_changed)
resizeFramebuffer(window);
if (!size_changed) resizeFramebuffer(window);
_glfwInputWindowContentScale(window, window->wl.scale, window->wl.scale);
}
@ -522,15 +521,12 @@ static void xdgSurfaceHandleConfigure(void* data,
} else {
ensure_csd_resources(window);
}
debug("final window content size: %dx%d\n", width, height);
debug("final window content size: %dx%d resized: %d\n", width, height, resized);
}
inform_compositor_of_window_geometry(window, "configure");
if (!resized) {
wl_surface_commit(window->wl.surface);
}
if (!resized) wl_surface_commit(window->wl.surface);
window->wl.pending_state = 0;
}