mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-12 02:42:56 +02:00
Prevent background panel launch taking focus from key window
This commit is contained in:
@@ -1981,8 +1981,6 @@ _glfwPlatformSetLayerShellConfig(_GLFWwindow* window, const GLFWLayerShellConfig
|
|||||||
[nswindow setLevel:level];
|
[nswindow setLevel:level];
|
||||||
[nswindow setCollectionBehavior: (NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorIgnoresCycle)];
|
[nswindow setCollectionBehavior: (NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorIgnoresCycle)];
|
||||||
[nswindow setFrame:NSMakeRect(x, y, width, height) display:YES animate:config.type != GLFW_LAYER_SHELL_BACKGROUND];
|
[nswindow setFrame:NSMakeRect(x, y, width, height) display:YES animate:config.type != GLFW_LAYER_SHELL_BACKGROUND];
|
||||||
if (config.type == GLFW_LAYER_SHELL_BACKGROUND) [nswindow orderBack:nil];
|
|
||||||
else [nswindow orderFrontRegardless];
|
|
||||||
return true;
|
return true;
|
||||||
#undef config
|
#undef config
|
||||||
#undef nswindow
|
#undef nswindow
|
||||||
@@ -2181,11 +2179,10 @@ int _glfwPlatformWindowBell(_GLFWwindow* window UNUSED)
|
|||||||
void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
// Make us the active application
|
// Make us the active application
|
||||||
// HACK: This is here to prevent applications using only hidden windows from
|
if ([window->ns.object canBecomeKeyWindow]) {
|
||||||
// being activated, but should probably not be done every time any
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
// window is shown
|
[window->ns.object makeKeyAndOrderFront:nil];
|
||||||
[NSApp activateIgnoringOtherApps:YES];
|
}
|
||||||
[window->ns.object makeKeyAndOrderFront:nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
||||||
|
|||||||
Reference in New Issue
Block a user