Also implement programmatic window resizing

This commit is contained in:
Kovid Goyal 2021-04-07 15:13:22 +05:30
parent a19d1fc140
commit bf3fc5fb92
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

9
glfw/wl_window.c vendored
View File

@ -861,9 +861,14 @@ void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
{
if (width != window->wl.width || height != window->wl.height) {
window->wl.width = width;
window->wl.height = height;
window->wl.user_requested_content_size.width = width;
window->wl.user_requested_content_size.height = height;
int32_t width = 0, height = 0;
set_csd_window_geometry(window, &width, &height);
window->wl.width = width; window->wl.height = height;
resizeFramebuffer(window);
wl_surface_commit(window->wl.surface);
ensure_csd_resources(window);
}
}