rawpython / remi

Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.
Apache License 2.0
3.48k stars 401 forks source link

standalone close button #472

Closed Wouter1 closed 1 year ago

Wouter1 commented 2 years ago

MacOS, Catalina and Big Sur: If you run a standalone application, and click the close button of the window (top left, red X button) the app does not close. command-Q works . I tried several suggestions for the code like ​https://github.com/dddomodossola/remi/issues/453 and ​https://github.com/dddomodossola/remi/blob/master/examples/onclose_window_app.py but nothing ever triggered even the close function.

Maybe part of the solution: In java, I remember that on macos you needed a separate close-button listener and map it to the application quit mechanism. Maybe it works like that here too?

dddomodossola commented 2 years ago

@Wouter1 Unfortunately I cannot test on MaxOS. However I suggest to not use standalone.

Kind Regards

Wouter1 commented 2 years ago

I'd like to remark that one of the main reasons for me to use remi is that it creates BOTH a webapp AND a standalone.

So, Is the remi stand-alone running possibilty officially supported ?

I'll investigate further into the issue with the standalone runner on big sur. I suspect that the person that reported it to me did just not notice that the standalone window opened behind some other windows (which is a separate but less urgent issue).

dddomodossola commented 2 years ago

@Wouter1 I see your point of view. Remi works on almost every browser as a remote or local GUI, with a look n feel and an API identical (and maybe better) than other GUI libraries. The "standalone" running ability is just a simple api that allows to hide the browser window and look a bit less web. This is possible thanks to third party lib like pywebview. Unfortunately, such libraries can be affected by bugs too, and (you can imagine) I cannot investigate and fix other libraries to work better with remi. This is why I discourage the use of standalone. Kind Regards ;-)

Wouter1 commented 2 years ago

@dddomodossola Thanks for the clarification. I understand that bugs in pywebview are out of your control.

But if you detect a bug in pywebview that impacts remi's behaviour, I suppose you file a bug report with pywebview?

Assuming pywebview properly supported, bugs would be ironed out that way? If not, would it be worth considering using a better supported standalone tool?