sshfs-win-manager icon indicating copy to clipboard operation
sshfs-win-manager copied to clipboard

Closing the window using Alt+F4 breaks the GUI

Open LoganDark opened this issue 3 years ago • 11 comments

If you use Alt+F4 to close the window, then the window gets destroyed and the tray icon stops working. Clicking results in this:

image

TypeError: Cannot read property 'show' of null
    at Tray.<anonymous>
    at Tray.emit (events.js:182:13)

Closing the window using the X button works properly.

LoganDark avatar Apr 14 '22 15:04 LoganDark

+1

Henu3duka avatar Jul 04 '22 15:07 Henu3duka

+1

Use reactions for this.

LoganDark avatar Jul 04 '22 15:07 LoganDark

lemme know if I should open a new issue, but I'm having this same exact error

ace510 avatar Jul 11 '22 02:07 ace510

Don't open a new issue if it's the same error

LoganDark avatar Jul 11 '22 02:07 LoganDark

it crashes really soon after it launches, if there are any filesystem logs I'm happy to paste them

ace510 avatar Jul 11 '22 02:07 ace510

it crashes really soon after it launches, if there are any filesystem logs I'm happy to paste them

That's a different problem

LoganDark avatar Jul 11 '22 02:07 LoganDark

Hello guys!

It seems that when you close using ALT+F4 the window gets destroyed not only hidden as it should be. I will take a look.

evsar3 avatar Jul 14 '22 18:07 evsar3

Hello guys!

It seems that when you close using ALT+F4 the window gets destroyed not only hidden as it should be. I will take a look.

For Electron you should be listening to the window close event (and just calling window close when clicking the close button), not having the close button run special logic

LoganDark avatar Jul 14 '22 18:07 LoganDark

This was my first and only program using Electron, so... I made a couple mistakes along the way. Including choosing a very outdated boilerplate... Now I have to almost completely redo this program. 😔

evsar3 avatar Jul 14 '22 19:07 evsar3

The program works pretty well in the meantime, so feel free to take your time. :P

LoganDark avatar Jul 14 '22 19:07 LoganDark

If anyone stumbles upon this in the future --- open task manager, search for sshfs and most likely it is running in the background. Kill it and launch again, it should work

Saumya-Gupta-26 avatar Jan 30 '24 22:01 Saumya-Gupta-26