-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
I am on ArchLinux with Hyprland and using the latest GLFW commit as a submodule in my mini vulkan project. Everything was fine until last few updates in Hyprland and GLFW but now, any GLFW window that I create keeps on shrinking its height with the same code that worked a while ago before the update. This only happens when I set GLFW_RESIZABLE to false.
In my hyprland config, I have only added the following line related to this window:
windowrule = float, title:^(Vulkan Engine)$
Here is a snippet of what I'm trying to do:
// [...]
if (!glfwInit()) {
LOG_ERROR_MSG("Couldn't initialize GLFW.");
abort();
}
LOG_INFO_MSG("GLFW Initialized");
if (!glfwVulkanSupported()) {
glfwTerminate();
LOG_ERROR_MSG("Vulkan not supported.");
abort();
}
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
window = glfwCreateWindow(window_extent.width, window_extent.height,
"Vulkan Engine", NULL, NULL);
glfwSetFramebufferSizeCallback(
window, [](GLFWwindow *_, int width, int height) {
LOG_INFO_MSG("Framebuffer size: {}x{}", width, height);
});
// [...]
LOG_DEBUG_MSG("Creating window surface");
VkSurfaceKHR c_surface;
VkResult glfw_result = glfwCreateWindowSurface(
implicit_cast<VkInstance>(instance), window, nullptr, &c_surface);
if (glfw_result != VK_SUCCESS) {
LOG_ERROR_MSG("Failed to create window surface. GLFW Error: {}",
std::to_string(glfw_result));
glfwDestroyWindow(window);
glfwTerminate();
abort();
}
surface = vk::SurfaceKHR{c_surface};
LOG_DEBUG_MSG("Window surface created successfully");
// [...]Other than these snippets, I never touch the GLFWWindow.
(full code here: https://github.com/krishna2803/fluids/tree/cpp)
Here is what happens when I run this:
ScreenCapture_1762641132.mp4
Here is what happens when GLFW_RESIZABLE is true. Notice the black offset on top of the window and the bottom of the window being weirdly stretched.
ScreenCapture_1762641251.mp4
More info:
$ hyprland --version
Hyprland 0.51.1 built from branch at commit 71a1216abcc7031776630a6d88f105605c4dc1c9 ([gha] Nix: update inputs).
Date: Mon Sep 22 20:54:03 2025
Tag: v0.51.1, commits: 6436
built against:
aquamarine 0.9.5
hyprlang 0.6.3
hyprutils 0.10.0
hyprcursor 0.1.13
hyprgraphics 0.2.0
no flags were set