You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
GLFW incorrectly applies or reports scaling factors under certain Linux compositors, particularly when running under Wayland. Even after explicitly disabling scaling hints using glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE) and glfwWindowHint(GLFW_SCALE_FRAMEBUFFER, GLFW_FALSE), GLFW continues to enforce compositor-level scaling, resulting in blurry or improperly scaled rendering. The main issue is not the scaling itself but the inability to effectively stop or bypass it.
To Reproduce
Steps to reproduce the behavior:
Add the following hints to the GLFW initialization code:
Launch the application on a Linux distribution using Wayland as the compositor.
Observe that GLFW still applies scaling factors reported by glfwGetWindowContentScale (e.g., Scale: 1.5, 1.5).
Note that the application appears blurry or improperly scaled despite the explicit attempt to disable scaling.
Expected behavior
GLFW should respect the hints to disable scaling, allowing the application to bypass compositor-level scaling and manage scaling internally.
Desktop (please complete the following information):
OS: [e.g., Arch Linux, Ubuntu 22.04]
Compositor: [e.g., Wayland]
GLFW Version: [e.g., 3.3.8]
Display: High-DPI or scaled display (e.g., 4K monitor with 150% scaling).
Additional context
Attempts to disable scaling using glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE) and glfwWindowHint(GLFW_SCALE_FRAMEBUFFER, GLFW_FALSE) have no effect. The problem is rooted in GLFW's inability to bypass compositor-enforced scaling, even when requested. While SDL reportedly handles this situation better, migrating from GLFW to SDL is a non-trivial task and deemed too resource-intensive for this minor inconvenience at the moment.
Future efforts may include:
Testing SDL to confirm it provides better control over scaling under Wayland.
Revisiting the decision to migrate if user experience is significantly impacted or GLFW provides no solution in future updates.
For now, this issue is acknowledged but will not be fixed until a simpler resolution or greater necessity arises.
The text was updated successfully, but these errors were encountered:
Atraxus
added
C-bug
Category: Something isn't working correctly
A-ui
Area: User interface for rendering and more
labels
Dec 19, 2024
Describe the bug
GLFW incorrectly applies or reports scaling factors under certain Linux compositors, particularly when running under Wayland. Even after explicitly disabling scaling hints using
glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE)
andglfwWindowHint(GLFW_SCALE_FRAMEBUFFER, GLFW_FALSE)
, GLFW continues to enforce compositor-level scaling, resulting in blurry or improperly scaled rendering. The main issue is not the scaling itself but the inability to effectively stop or bypass it.To Reproduce
Steps to reproduce the behavior:
glfwGetWindowContentScale
(e.g.,Scale: 1.5, 1.5
).Expected behavior
GLFW should respect the hints to disable scaling, allowing the application to bypass compositor-level scaling and manage scaling internally.
Desktop (please complete the following information):
Additional context
Attempts to disable scaling using
glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE)
andglfwWindowHint(GLFW_SCALE_FRAMEBUFFER, GLFW_FALSE)
have no effect. The problem is rooted in GLFW's inability to bypass compositor-enforced scaling, even when requested. While SDL reportedly handles this situation better, migrating from GLFW to SDL is a non-trivial task and deemed too resource-intensive for this minor inconvenience at the moment.Future efforts may include:
For now, this issue is acknowledged but will not be fixed until a simpler resolution or greater necessity arises.
The text was updated successfully, but these errors were encountered: