-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
OS and version: Arch Linux (Linux 6.16.4-arch1-1 x86_64)
Release or commit: GLFW v3.4
Error messages: None
Events output: Not applicable
I am on Arch Linux using GNOME w/ Wayland (XDG_SESSION_TYPE outputs wayland in the terminal). On my main monitor (which is 3840x2160), the window is twice the size it should be. When dragging the window to another monitor (in this case, a 1024x768 Dell CRT monitor connected via an HDMI adapter), it shrinks back down to the expected size. Furthermore, glViewport() doesn't seem to work until the window has been resized at least once (it's called every render cycle, not in a window resize callback). This causes the framebuffer to be smaller than it should be even on the CRT monitor until it's been resized.
If I half the size of the window (i.e., divide the width and height by two in glfwSetWindowSize()), it is the expected size on my main monitor and the frame buffer fills the entire window (after resizing as specified earlier). Then, if I drag it to my CRT monitor, it's half the size and only a quarter of the frame buffer can be seen. Calling glfwGetWindowSize() also returns what I passed to glfwSetWindowSize(), even though it doesn't match the size on either monitor.
I have attached screenshots of the window below in the following order: Main monitor before resizing, main monitor after resizing, CRT monitor before resizing, CRT monitor after resizing. Please let me know if you need any more information and I will reply as soon as I can.