glfwSetWindowPos

Sets the position of the content area of the specified window.

This function sets the position, in screen coordinates, of the upper-left corner of the content area of the specified windowed mode window. If the window is a full screen window, this function does nothing.

__Do not use this function__ to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.

The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.

extern (C) @nogc nothrow __gshared
void
glfwSetWindowPos

Parameters

window GLFWwindow*

The window to query.

xpos int

The x-coordinate of the upper-left corner of the content area.

ypos int

The y-coordinate of the upper-left corner of the content area.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

@remark @wayland There is no way for an application to set the global position of its windows, this function will always emit @ref GLFW_PLATFORM_ERROR.

Thread Safety

This function must only be called from the main thread.

@sa @ref window_pos @sa @ref glfwGetWindowPos

Meta

Since

Added in version 1.0. @glfw3 Added window handle parameter.

Ingroup: window