-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rcore] HiDPI not working as expected on Wayland protocol #3872
Comments
This looks the same as the issue in raylib-go gen2brain/raylib-go#354. With different compositors, it works but with Gnome/Mutter, it is like that (although I cannot reproduce it in VM with Gnome/Wayland). You can just use an X11 session, or compile with SDL, or try a different compositor, but it looks like it is specific to something in Gnome. |
Just to add, before that commit, you were using X11 compatibility mode in Wayland, now you are using native Wayland mode. In raylib-go I added a build tag |
I can't test because i don't have access to a Wayland based system, but could it comes from here ? raylib/src/platforms/rcore_desktop_glfw.c Lines 1300 to 1310 in 7468074
According to GLFW documentation, Wayland is sensitive to the Note that And the doc also suggest that I tested with both hints enabled at once on my Linux X11, and found no difference. So maybe, removing the optional if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0)
{
// Resize window content area based on the monitor content scale.
// NOTE: This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11.
// On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); // Scale content area based on the monitor content scale where window is placed on
glfwWindowHint(GLFW_SCALE_FRAMEBUFFER, GLFW_TRUE);
}
else glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE); edit note that there is an other pending issue related to fullscreen and |
Could you please test this PR #4151 ? |
Wayland backend has been disabled by default due to multiple issues with it. |
Please, before submitting a new issue verify and check:
Issue description
Something happened in this branch merge 1904873 that broke the HiDPI behavior in Linux environment, if I switch to previous commit, before the merge, all is proper 68b553c
Environment
export LIBGL_ALWAYS_SOFTWARE=1
to avoid trouble with the Nvidia WSL driversIssue Screenshot
This produces this image, when running the sample, which renders incorrectly, mouse events are also off
This produces this image, when running the sample, which render properly
Code Example
The text was updated successfully, but these errors were encountered: