Fullscreen on linux

lazycow wrote on Friday, April 12, 2013:

Hi, i am opening a fullscreen window with the dimensions of the desktop:
This returns 1600x1200 which is correct and the Window opens in that resolution.

But I am constantly checking the window size with subsequent calls of glfwGetWindowSize(&w,&h); return a different size - e.g. 1534x1178. But only for a short time, then glfwGetWindowSize() returns 1600x1200 again.
If I set the xfce-toobars on both sides to “autohide”, then glfwGetWindowSize() returns 1600x1178, but still not 1600x1200
It also seems like the fullscreen window changes its size in the first 1-2 seconds.
Is this the normal behavior? Linux/Xubuntu 12.04 (It does not happen with the windows-build)

elmindreda wrote on Sunday, April 14, 2013:

GLFW asks the window manager to handle making windows full screen. It is up to each individual window manager what full screen actually means. It seems that Xfwm4 doesn’t use the entire screen for full screen windows. There’s little that can be done about that, apart from overriding the window manager altogether, but then you lose some window functionality.

lazycow wrote on Monday, April 15, 2013:

Update: I have recomplied glfw without Xrandr support and now it seems to work fine. (at least with xfwm4)

Anyway, is it recommended to check the actual window size after you have created the window?

elmindreda wrote on Monday, April 15, 2013:

Yes, it is. With GLFW 2.x, you may need to poll events once before you’re guaranteed to have a truly up-to-date window size, but it shouldn’t matter very much if your window size is a little off for the first frame.