mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
macOS: When closing a top-level window only switch focus to the previous kitty window if it is on the same workspace
Fixes #1379 Fixes #1383
This commit is contained in:
@@ -372,8 +372,8 @@ cocoa_focus_window(void *w) {
|
||||
int
|
||||
cocoa_get_workspace_id(void *w) {
|
||||
NSWindow *window = (NSWindow*)w;
|
||||
int ans = 0;
|
||||
CGSGetWindowWorkspace(_CGSDefaultConnection(), [window windowNumber], &ans);
|
||||
int ans = -1;
|
||||
if (window) CGSGetWindowWorkspace(_CGSDefaultConnection(), [window windowNumber], &ans);
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user