Added close behaviour option for specific window (#3754)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
c3c7e5f705
commit
9573af115a
10 files changed
+172
-28
No files matched your search
@@ -2,6 +2,7 @@ use crate::element::DesktopElement;
|
||||
use crate::file_upload::DesktopFileDragEvent;
|
||||
use crate::menubar::DioxusMenu;
|
||||
use crate::PendingDesktopContext;
|
||||
use crate::WindowCloseBehaviour;
|
||||
use crate::{
|
||||
app::SharedContext,
|
||||
assets::AssetHandlerRegistry,
|
||||
@@ -160,6 +161,7 @@ pub(crate) struct WebviewInstance {
|
||||
pub edits: WebviewEdits,
|
||||
pub desktop_context: DesktopContext,
|
||||
pub waker: Waker,
|
||||
pub close_behaviour: Option<WindowCloseBehaviour>,
|
||||
|
||||
// Wry assumes the webcontext is alive for the lifetime of the webview.
|
||||
// We need to keep the webcontext alive, otherwise the webview will crash
|
||||
@@ -431,6 +433,7 @@ impl WebviewInstance {
|
||||
desktop_context,
|
||||
_menu: menu,
|
||||
_web_context: web_context,
|
||||
close_behaviour: cfg.window_close_behaviour,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user