muffon icon indicating copy to clipboard operation
muffon copied to clipboard

Quit does not work, have to force quit on MacOS

Open demensdeum opened this issue 10 months ago • 21 comments

Steps:

  1. Run muffon on MacOS
  2. Close player window
  3. Muffon in still in Dock
  4. Right click on muffon in Dock -> Quit
  5. Doesn't close
  6. Optional key + right click on muffon -> Force quit

demensdeum avatar Apr 03 '24 06:04 demensdeum

Hey! Nice to see ya again :)

That's actually intentional. You have to actually turn ON "exit on close" from the settings. image

Have a nice day!

xyloflake avatar Apr 03 '24 06:04 xyloflake

Wow nice

demensdeum avatar Apr 03 '24 06:04 demensdeum

But right-> quit should work as in other apps, for example Telegram @xyloflake

demensdeum avatar Apr 03 '24 06:04 demensdeum

@demensdeum Hello. "Quit" in tray works as you described. "Quit" from context menu will behave the same as window's close button. I guess I should improve dock's context menu.

staniel359 avatar Apr 03 '24 07:04 staniel359

@staniel359 idea that vscode, telegram, Firefox, Google Chrome are closing entirely from dock -> right click-> context menu -> quit (process exits/killed) on MacOS, and muffin is still appear, and if window closed it looks like it stuck.

demensdeum avatar Apr 03 '24 08:04 demensdeum

@demensdeum Got it, needs an improvement.

staniel359 avatar Apr 03 '24 08:04 staniel359

@staniel359 what's the proposed solution to this? Quit on calling quit from dock?

xyloflake avatar May 31 '24 11:05 xyloflake

@xyloflake On Linux "Quit" from dock behaves like close button. And "Quit" from tray quits. I don't know for MacOS.

staniel359 avatar May 31 '24 12:05 staniel359

@staniel359 it's the same on macOS but the expected behaviour is to exit when you click on quit

xyloflake avatar May 31 '24 12:05 xyloflake

@xyloflake Ok then.

staniel359 avatar May 31 '24 12:05 staniel359

@staniel359 ok what? Change the default setting to exit on close = true on macOS?

xyloflake avatar May 31 '24 12:05 xyloflake

@xyloflake

the expected behaviour is to exit when you click on quit

Ok to this.

staniel359 avatar May 31 '24 20:05 staniel359

@staniel359 I mean we should just change the default value for macos right?

xyloflake avatar May 31 '24 20:05 xyloflake

@staniel359 No. Person may not want to exit on close, but should be able to exit the app from dock/tray. So this "Quit" action in dock/tray should be redefined.

staniel359 avatar Jun 01 '24 07:06 staniel359

@staniel359 idt there's any way to differentiate the close button and quit from dock. Also, the red button on macOS is for closing the app and yellow is for minimising the app, why would anyone click close if they do not mean to close it?

xyloflake avatar Jun 01 '24 10:06 xyloflake

@xyloflake Don't know about Mac, but on Windows "Close" can either exit or just close the window if tray is present. And minimize puts it in the taskbar.

staniel359 avatar Jun 01 '24 12:06 staniel359

@demensdeum @xyloflake The current logic is: "Quit" in dock and close button behave the same (closing the window). If "Quit on close" option is enabled, they both quit the app. If it's disabled, only "Quit" in tray quits the app.

Unforunately Electron's API doesn't allow to tell whether the app is being quit from dock or not: https://github.com/electron/electron/issues/25680#issuecomment-708099455 So I'm closing this.

staniel359 avatar Jul 13 '24 12:07 staniel359

@staniel359 electron's API does not "tell" you where the app is closed from because macos doesn't treat both of them as different. And if you abide by the rules of macos, which you totally should for UX purposes, you should never ever treat both of them differently.

The default on macos should be changed to abide by it. Therefore unless explicitly stated by the user, it will treat both of them as the same.

xyloflake avatar Jul 13 '24 16:07 xyloflake

A solution to tell apart dock and window close would be to include custom window control buttons that look like the original ones but in reality it would be custom, therefore allowing you to detect close when triggered through the window control buttons.

xyloflake avatar Jul 13 '24 16:07 xyloflake

@xyloflake Good point. But that goes to frameless window task.

staniel359 avatar Jul 13 '24 16:07 staniel359

@xyloflake Good point. But that goes to frameless window task.

Thanks. Let's keep this open and wait for the frameless window task to be completed. Once that's done, we can try to bring in custom window controls.

xyloflake avatar Jul 13 '24 16:07 xyloflake