staniel359 / muffon

Advanced multi-source music streaming + discovery client for desktop. Free, clean, no login, no ads.
https://muffon.netlify.app
GNU Affero General Public License v3.0
1.35k stars 58 forks source link

[bug] keybindings override system shortcuts #211

Open roloit opened 2 weeks ago

roloit commented 2 weeks ago

Weird thing now, probably a bug? On macOS, if I click play, then hide the window, go to another application/tab, and try to force quit the application (Say I'm in a browser, decide to force quit it with shortcut, muffon is hidden), instead of the application I'm in to quit, muffon quits, and it happens even if I don't have any windows open... It happens in version 2.1.0, version 2.0.3 doesn't have that issue.

xyloflake commented 1 week ago

@roloit can you attach a video of the bug? I can't reproduce it on my end (macos Monterrey).

roloit commented 1 week ago

So first I start playing something, hide the window, then click the force quit shortcut while the application is hidden, it quits the application, it's very annoying when you try to quit other apps, and first, muffon quits, only then you can quit the application you're in. macOS Sequioa https://github.com/user-attachments/assets/e18b2e4e-8114-4e89-879a-b5efb13ce311

xyloflake commented 1 week ago

So first I start playing something, hide the window, then click the force quit shortcut while the application is hidden, it quits the application, it's very annoying when you try to quit other apps, and first, muffon quits, only then you can quit the application you're in. macOS Sequioa https://github.com/user-attachments/assets/e18b2e4e-8114-4e89-879a-b5efb13ce311

Hmm.... I'll check the code for just-in-case.

For confirmation @roloit : you're holding down Cmd+Q right? Also please check the menu bar, on the top left, it should show the application name you're focussed on, if muffon is in focus, it will force quit.

xyloflake commented 1 week ago

Found the bug, no need to worry. Thank you for the report. I'll go ahead and report this.

@roloit this will be fixed in the next version. We apologize for the inconvenience caused.

https://github.com/staniel359/muffon/blob/b067d73825105452da8cfec700d1ba868f950b99/electron/actions/app/setupGlobalShortcuts.js#L16

@staniel359 @gamersi this registers a globalShortcut, meaning the shortcut will be registered system-wide. In this case Cmd+Q is registered system-wide as quit for muffon and even when the user uses the keybinding on another app they want to close, the keybinding fires the quit function. Solution would be to NOT register the shortcut globally but locally instead.

roloit commented 1 week ago

I definitely was outside of muffon. Thanks for finding the bug! I will probably use previous release right now.

xyloflake commented 1 week ago

I definitely was outside of muffon. Thanks for finding the bug! I will probably use previous release right now.

Note: You don't have to wait for official releases. Our beta program offers facilities for testing the fixes (e.g., v2.1.0 had 23 beta tests). What you can do:

  1. Wait for our fix.
  2. Join the beta program.
  3. Use the beta version until stability is confirmed.

TL;DR Wait for us to fix this issue, enroll in the beta program and use the beta until we declare the fix stable. I do not see an official release coming in the next 8 weeks. But betas are quite frequent.