diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 241508e8d..4bbf27900 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -3322,6 +3322,7 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib); * [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib), * [GLFW_FLOATING](@ref GLFW_FLOATING_attrib) and * [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib). + * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib). * * Some of these attributes are ignored for full screen windows. The new * value will take effect if the window is later made windowed. diff --git a/src/window.c b/src/window.c index 85351ade8..2616d24a6 100644 --- a/src/window.c +++ b/src/window.c @@ -895,6 +895,8 @@ GLFWAPI void glfwSetWindowAttrib(GLFWwindow* handle, int attrib, int value) if (!window->monitor) _glfwPlatformSetWindowFloating(window, value); } + else if (attrib == GLFW_FOCUS_ON_SHOW) + window->focusOnShow = value; else _glfwInputError(GLFW_INVALID_ENUM, "Invalid window attribute 0x%08X", attrib); }