Hi,
I am using GLFW to do Vulkan rendering, and I was wondering if using Wayland is possible with GLFW actually.
I am using GLFW 3.3.2 (provided by an Ubuntu package).
Actually opening a window (I am using Gnome Shell), will provide a plain white decoration around the window.
If I choose to use this decoration here are the problems :
- If content scaling is activated on the desktop, the decorations seem to be scaled but the window itself is not. So for a 2x2 scaling the window will use a quarter of the area.
- Furthermore if one use fractional scaling, the scale reported by glfwGetMonitorScale() will only be integers (is this a problem with Gnome Shell or with GLFW though ?)
- I don’t see any way to draw inside these white decorations myself or to choose their size or to modify their behavior ?
If I choose to remove decorations (window hint GLFW_DECORATED set to false) and decide do “simulate” decorations myself, here are the problems :
- I cannot position the window using glfwSetWindowPos() so my window will always appear around the top-left corner of the screen and will not be allowed to move by any way.
So I am a bit stuck with all this. Do I do something wrong ? Should I try directly the GLFW sources ? My test program is simple :
glfwInit();
GLFWwindow* window = glfwCreateWindow(256, 256, "test", NULL, NULL);
glfwSetWindowPos(window, 256, 256);
glfwShowWindow(window);
while (true) {
glfwPollEvents();
}
I am willing to help if necessary for testing or any other way to make this work.
Thanks a lot for any advice and help. By the way GLFW is a great library !
P.S. why I don’t want to use the X11 version : well, I am using Wayland and Gnome Shell that I like both a lot Furthermore Wayland seems to be the future. And finally when using the X11 version the scaling is also bad but this time no way to avoid having a blurry upscaled window.