mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 08:50:15 +00: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:
+11
-10
@@ -84,6 +84,7 @@ static GLFWbool enterFullscreenMode(_GLFWwindow* window)
|
||||
bounds.size.height);
|
||||
|
||||
[window->ns.object setFrame:frame display:YES];
|
||||
_glfwPlatformFocusWindow(window);
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1039,6 +1040,16 @@ void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
|
||||
}
|
||||
|
||||
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
||||
{
|
||||
[window->ns.object orderFront:nil];
|
||||
}
|
||||
|
||||
void _glfwPlatformHideWindow(_GLFWwindow* window)
|
||||
{
|
||||
[window->ns.object orderOut:nil];
|
||||
}
|
||||
|
||||
void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
||||
{
|
||||
// Make us the active application
|
||||
// HACK: This has been moved here from initializeAppKit to prevent
|
||||
@@ -1049,16 +1060,6 @@ void _glfwPlatformShowWindow(_GLFWwindow* window)
|
||||
[window->ns.object makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
void _glfwPlatformUnhideWindow(_GLFWwindow* window)
|
||||
{
|
||||
[window->ns.object orderFront:nil];
|
||||
}
|
||||
|
||||
void _glfwPlatformHideWindow(_GLFWwindow* window)
|
||||
{
|
||||
[window->ns.object orderOut:nil];
|
||||
}
|
||||
|
||||
int _glfwPlatformWindowFocused(_GLFWwindow* window)
|
||||
{
|
||||
return [window->ns.object isKeyWindow];
|
||||
|
||||
Reference in New Issue
Block a user