Also implement programmatic window resizing
This commit is contained in:
parent
a19d1fc140
commit
bf3fc5fb92
1 changed files with 7 additions and 2 deletions
9
glfw/wl_window.c
vendored
9
glfw/wl_window.c
vendored
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue