kando-menu / kando

🥧 The Cross-Platform Pie Menu.
https://ko-fi.com/post/Kando-1-0-0-released-G2G5Z1DOS
Other
2.65k stars 78 forks source link

Kando doesn't always open on the current desktop on MacOS #405

Closed SeseMueller closed 3 months ago

SeseMueller commented 5 months ago

Kando works well on MacOS, but there is a particular sharp edge when using it with multiple desktops.

To clarify, MacOS supports multiple desktops per screen and they can switched between with Control+Left and Control+Right and managed in "Mission Control" mode.

When launching Kando, it always opens on a specific desktop instead of the currently selected one. It does however launch on the correct screen (the one that is currently focussed), so every screen seems to have one "designated desktop" to launch Kando in.

A fix would require Kando to always use the focussed desktop.

Schneegans commented 5 months ago

Thanks for the report, I'll look into it! In the mean time, I'll also happily accept any pull request which fixes this :wink:

Schneegans commented 4 months ago

I tested this on macOS 11 and did not experience any issues. Nevertheless, I pushed a small change to the fix/405 branch which explicitly tells the window to be visible on all workspaces. Could you try this?

If you need instructions on how to run Kando from git, please let me know!

SeseMueller commented 4 months ago

Thank you, I got it running. The fixed version works perfectly for me on a single screen. I'll test it shortly on multiple screens, but am positive that it should just work.

Thanks for the fix, I'll report back shortly!

SeseMueller commented 4 months ago

Alright, I tested it now with a two monitor setup and it works flawlessly. As expected, the menu always pops up under the cursor, no matter which screen or dektop you are on or what app you have focussed.

Edit: I would like to add that I have found a bug where, if you close a fullscreen application that also has a non-fullscreen window open (i.e. a web browser), kando gets "stuck" on that non-fullscreen window until you open kando on a different screen.

Example: open two firefox windows; make one fullscreen; close it; move to neighbour desktop (control+right/left); open kando => it jumps back to the open firefox window.

Schneegans commented 3 months ago

Edit: I would like to add that I have found a bug where, if you close a fullscreen application that also has a non-fullscreen window open (i.e. a web browser), kando gets "stuck" on that non-fullscreen window until you open kando on a different screen.

Example: open two firefox windows; make one fullscreen; close it; move to neighbour desktop (control+right/left); open kando => it jumps back to the open firefox window.

Could you create a new issue for that? Thank you!

Schneegans commented 3 months ago

@SeseMueller I just realized that this "fix" introduced an issue: Kando now shows a dock icon on macOS! I tried it once more, and I cannot reproduce the original issue you are describing.

Could you maybe try again with the current main branch and remove this line? Maybe the issue got fixed along the way and the workaround is not needed anymore...

Without this line, the dock icon is gone on my system...

SeseMueller commented 3 months ago

@SeseMueller I just realized that this "fix" introduced an issue: Kando now shows a dock icon on macOS! I tried it once more, and I cannot reproduce the original issue you are describing.

Could you maybe try again with the current main branch and remove this line? Maybe the issue got fixed along the way and the workaround is not needed anymore...

Without this line, the dock icon is gone on my system...

As expected, the fix on main does work (I'll open the issue from last week in a moment). Deleting or modifying the line you refered to does not do anything for me. I don't know why it suddenly shows a dock icon. But electron does have capabilities for the macOS dock. Specifically, hiding the dock was already discussed here and is implemented. I personally tried to get

if (process.platform === 'darwin') {
        app.dock.hide();
      }

to run, but I didn't find a way to correctly hook into the event system in place.