forked from mirror/vulkan-zig
The requested dimensions of a newly created window may be different from the actual dimensions as the window system may enforce additional restrictions. This happens, for example, when using Wayland with a scaling factor of 3 (the default width of 800 is not divisible by 3). To fix it, just re-query the actual framebuffer size after creating the window. The GLFW documentation also suggests to do this: > The created window, framebuffer and context may differ from what you requested, > as not all parameters and hints are hard constraints. This includes the size of > the window, especially for full screen windows. To query the actual attributes > of the created window, framebuffer and context, see glfwGetWindowAttrib, > glfwGetWindowSize and glfwGetFramebufferSize. -- https://www.glfw.org/docs/3.3/group__window.html#ga3555a418df92ad53f917597fe2f64aeb This should be a better fix for #192