glfw / glfw

A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
https://www.glfw.org
zlib License
12.87k stars 5.17k forks source link

Wayland: The platform does not provide the window position #2621

Open gucio321 opened 3 days ago

gucio321 commented 3 days ago

Hi! I come from cimgui-go. I just noticed we're using an old version of glfw which didn't include some cool features we'd like. I decided to update to v3.4 in https://github.com/AllenDang/cimgui-go/pull/314 but now when I'm running our example on my machine I'm getting tone of errors like this:

Glfw Error 65548: Wayland: The platform does not provide the window position

Is it something about my machine or way cimgui-go uses glfw? I searched for similar error but found nothing. could you guys help me :pray:

OS info:

thanx in advance!

ek-x-net commented 2 days ago

Wayland, at the moment, does not support getting/setting window positions.

void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos)
{
    // A Wayland client is not aware of its position, so just warn and leave it
    // as (0, 0)

    _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
                    "Wayland: The platform does not provide the window position");
}

void _glfwSetWindowPosWayland(_GLFWwindow* window, int xpos, int ypos)
{
    // A Wayland client can not set its position, so just warn

    _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
                    "Wayland: The platform does not support setting the window position");
}

There is an open merge request for a new protocol that addresses this.

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/264