-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Mac Workspaces Switching #517
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,6 +380,12 @@ export class KandoApp { | |
|
||
// On all platforms except Windows, we show the window after we moved it. | ||
if (process.platform !== 'win32') { | ||
// Ensure the window is on the current worksspace before showing | ||
this.window.setVisibleOnAllWorkspaces(true, { skipTransformProcessType: true }); | ||
setTimeout(() => { | ||
this.window.setVisibleOnAllWorkspaces(false, { skipTransformProcessType: true }); | ||
}, 100); | ||
// Now let's show the window | ||
this.showWindow(); | ||
} | ||
|
||
|
@@ -488,6 +494,12 @@ export class KandoApp { | |
// fullscreen applications. | ||
this.window.setAlwaysOnTop(true, 'screen-saver'); | ||
|
||
// We set the Activation Policy to Accessory so that Kando doesn't show in dock | ||
// or the CMD Tab App Switcher. This is only for MacOS. | ||
if (process.platform === 'darwin') { | ||
app.setActivationPolicy('accessory') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is mac exclusive, a non-mac user needs to test it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. Added a commit with a condition which should make it mac-only. |
||
} | ||
|
||
// If the user clicks on a link, we close Kando's window and open the link in the | ||
// default browser. | ||
this.window.webContents.setWindowOpenHandler(({ url }) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this does not seem to be required on Linux, I would prefer if that was only done on macOS. So maybe move this before the
if (process.platform !== 'win32') {
into anif (process.platform === 'darwin' {
?Also, you could mention #461 in the comment so that we know in the future where this weirdo comes from 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Pushed a new commit with the change 👍️