mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Command-tabbing fix for OS X.
This commit is contained in:
parent
8210f89b12
commit
2a32a783a7
@ -1249,12 +1249,30 @@ void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
|
|||||||
|
|
||||||
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
[window->ns.object orderFront:nil];
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
[window->ns.object makeKeyAndOrderFront:window->ns.object];
|
||||||
|
|
||||||
|
NSApplicationPresentationOptions options =
|
||||||
|
NSApplicationPresentationHideDock +
|
||||||
|
NSApplicationPresentationHideMenuBar +
|
||||||
|
NSApplicationPresentationDisableProcessSwitching +
|
||||||
|
NSApplicationPresentationDisableHideApplication;
|
||||||
|
[NSApp setPresentationOptions:options];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[window->ns.object orderFront:window->ns.object];
|
||||||
|
|
||||||
|
NSApplicationPresentationOptions options =
|
||||||
|
NSApplicationPresentationDefault;
|
||||||
|
[NSApp setPresentationOptions:options];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformHideWindow(_GLFWwindow* window)
|
void _glfwPlatformHideWindow(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
[window->ns.object orderOut:nil];
|
[window->ns.object orderOut:window->ns.object];
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
||||||
@ -1265,7 +1283,23 @@ void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
|||||||
// should probably not be done every time any window is shown
|
// should probably not be done every time any window is shown
|
||||||
[NSApp activateIgnoringOtherApps:YES];
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
|
|
||||||
[window->ns.object makeKeyAndOrderFront:nil];
|
[window->ns.object makeKeyAndOrderFront:window->ns.object];
|
||||||
|
|
||||||
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
NSApplicationPresentationOptions options =
|
||||||
|
NSApplicationPresentationHideDock +
|
||||||
|
NSApplicationPresentationHideMenuBar +
|
||||||
|
NSApplicationPresentationDisableProcessSwitching +
|
||||||
|
NSApplicationPresentationDisableHideApplication;
|
||||||
|
[NSApp setPresentationOptions:options];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSApplicationPresentationOptions options =
|
||||||
|
NSApplicationPresentationDefault;
|
||||||
|
[NSApp setPresentationOptions:options];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
||||||
@ -1363,6 +1397,22 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
|||||||
|
|
||||||
[window->ns.object setHasShadow:YES];
|
[window->ns.object setHasShadow:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
NSApplicationPresentationOptions options =
|
||||||
|
NSApplicationPresentationHideDock +
|
||||||
|
NSApplicationPresentationHideMenuBar +
|
||||||
|
NSApplicationPresentationDisableProcessSwitching +
|
||||||
|
NSApplicationPresentationDisableHideApplication;
|
||||||
|
[NSApp setPresentationOptions:options];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSApplicationPresentationOptions options =
|
||||||
|
NSApplicationPresentationDefault;
|
||||||
|
[NSApp setPresentationOptions:options];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int _glfwPlatformWindowFocused(_GLFWwindow* window)
|
int _glfwPlatformWindowFocused(_GLFWwindow* window)
|
||||||
|
Loading…
Reference in New Issue
Block a user