Browse Source

put webview in rc

Jonathan Kelley 2 years ago
parent
commit
3658698064
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/desktop/src/desktop_context.rs

+ 2 - 2
packages/desktop/src/desktop_context.rs

@@ -52,7 +52,7 @@ pub(crate) type WebviewQueue = Rc<RefCell<Vec<WebviewHandler>>>;
 /// ```
 /// ```
 pub struct DesktopService {
 pub struct DesktopService {
     /// The wry/tao proxy to the current window
     /// The wry/tao proxy to the current window
-    pub webview: WebView,
+    pub webview: Rc<WebView>,
 
 
     /// The proxy to the event loop
     /// The proxy to the event loop
     pub proxy: ProxyType,
     pub proxy: ProxyType,
@@ -94,7 +94,7 @@ impl DesktopService {
         shortcut_manager: ShortcutRegistry,
         shortcut_manager: ShortcutRegistry,
     ) -> Self {
     ) -> Self {
         Self {
         Self {
-            webview,
+            webview: Rc::new(webview),
             proxy,
             proxy,
             event_loop,
             event_loop,
             query: Default::default(),
             query: Default::default(),