mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
Add glfwFocusWindow
This removes the (undocumented) behavior where glfwShowWindow would bring the window to front and set input focus. That function now does what it says.
This commit is contained in:
@@ -2283,6 +2283,34 @@ GLFWAPI void glfwShowWindow(GLFWwindow* window);
|
||||
*/
|
||||
GLFWAPI void glfwHideWindow(GLFWwindow* window);
|
||||
|
||||
/*! @brief Brings the specified window to front and sets input focus.
|
||||
*
|
||||
* This function brings the specified window to front and sets input focus.
|
||||
* The window should already be visible and not iconified.
|
||||
*
|
||||
* By default, both windowed and full screen mode windows are focused when
|
||||
* initially created. Set the [GLFW_FOCUSED](@ref window_hints_wnd) to disable
|
||||
* this behavior.
|
||||
*
|
||||
* __Do not use this function__ to steal focus from other applications unless
|
||||
* you are certain that is what the user wants. Focus stealing can be
|
||||
* extremely disruptive.
|
||||
*
|
||||
* @param[in] window The window to give input focus.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref window_focus
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup window
|
||||
*/
|
||||
GLFWAPI void glfwFocusWindow(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the monitor that the window uses for full screen mode.
|
||||
*
|
||||
* This function returns the handle of the monitor that the specified window is
|
||||
|
||||
Reference in New Issue
Block a user