webview / webview

Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).
https://webview.dev
MIT License
12.36k stars 929 forks source link

Last window closed custom logic (macOS) #1085

Closed SteffenL closed 5 months ago

SteffenL commented 5 months ago

We used to let the system/UI framework automatically handle when to terminate the app after the last window was closed. We used custom logic to stop the run loop instead of terminating the whole process.

Now we handle the stopping of the run loop without having to awkwardly initiate termination just to block it and do something else instead.

Future work can e.g. add a flag that allows the user of the library to choose whether to "terminate" (stop the run loop) when the last window is closed.