oni icon indicating copy to clipboard operation
oni copied to clipboard

Oni can only be closed by right clicking the dock Icon to fully close the app

Open akinsho opened this issue 7 years ago • 4 comments

Was not entirely sure whether to raise this issue as since changes to the browserWindow management in #1747 I've found oni windows behave more predictably and reliably, thanks @CrossR.

Wasn't sure I wanted to instigate any tweak given the new found freedom from weird bugs, but electron leave a comment in the main.js relating to macOS and closing windows as macOS has some peculiar behaviour regarding closing apps but in general most mac apps fully close if cmd-q is pressed but with oni atm as I believe a reference to the/a window ?remains somewhere the app doesn't actually quit only the window closes

below is I believe the snippet - though in our case it no longer works

// Quit when all windows are closed.
app.on('window-all-closed', () => {
  // On macOS it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

EDIT: apologies that snippet doesn't do what I thought it did, not sure what event is fired when command Q is hit and why it no longer closes the app entirely

akinsho avatar Mar 29 '18 13:03 akinsho

Actually reading about this online it seems to be a bit of a debate but I think/most of my mac apps fully close when I hit cmd-q, save the snippet's code seems to contradict that but the comment seems to support it 😕 ❓

akinsho avatar Mar 29 '18 13:03 akinsho

I also have this issue.

Most MacOS apps will fully "Quit" when you press Cmd+q and it will be fully terminated. However, the difference between MacOS and say Windows is that in most apps, if you click the "X" on the window in MacOS, the app doesn't "Quit" it will still be open, just with no window. In Windows, this will terminate the app.

jwmann avatar Aug 08 '18 17:08 jwmann

I believe I fixed this issue in #2404

ackey avatar Aug 10 '18 12:08 ackey

Just downloaded Oni for the first time (v0.3.6) and cmd+q indeed does not quit. Sometimes (I cannot really tell what triggers it) it closes the window I have open, but the app does not fully quit until I right-click Oni on the dock and hit Quit

brunobely avatar Mar 10 '19 00:03 brunobely