mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Fix LSP server staying alive when closing preview window
* Provide an internal behavior parameter to run_event_loop() that we can use from the preview to not quit when the last window was closed. * Fix Drop for the winit event loop GraphicsWindow to drop the backend window correctly when unmapping, not when the graphics window dies. Otherwise QuitOnLastWindowClosed doesn't work.
This commit is contained in:
parent
b81803774b
commit
1e4921de13
9 changed files with 55 additions and 24 deletions
|
@ -34,7 +34,8 @@ pub unsafe extern "C" fn sixtyfps_component_window_init(out: *mut ComponentWindo
|
|||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sixtyfps_run_event_loop() {
|
||||
crate::backend().run_event_loop();
|
||||
crate::backend()
|
||||
.run_event_loop(sixtyfps_corelib::backend::EventLoopQuitBehavior::QuitOnLastWindowClosed);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue