Some fixes for wayland and ios. (#602)
This commit is contained in:
1 parent
3b7b503333
commit
7e3a6fb4a4
2 files changed
+8
-2
No files matched your search
@@ -28,7 +28,7 @@ tokio = { version = "1.16.1", features = [
|
|||||||
"rt",
|
"rt",
|
||||||
"time",
|
"time",
|
||||||
], optional = true, default-features = false }
|
], optional = true, default-features = false }
|
||||||
webbrowser = "0.7.1"
|
webbrowser = "0.8.0"
|
||||||
infer = "0.9.0"
|
infer = "0.9.0"
|
||||||
dunce = "1.0.2"
|
dunce = "1.0.2"
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,13 @@ pub(super) fn handler(
|
|||||||
) {
|
) {
|
||||||
// currently dioxus-desktop supports a single window only,
|
// currently dioxus-desktop supports a single window only,
|
||||||
// so we can grab the only webview from the map;
|
// so we can grab the only webview from the map;
|
||||||
let webview = desktop.webviews.values().next().unwrap();
|
// on wayland it is possible that a user event is emitted
|
||||||
|
// before the webview is initialized. ignore the event.
|
||||||
|
let webview = if let Some(webview) = desktop.webviews.values().next() {
|
||||||
|
webview
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
let window = webview.window();
|
let window = webview.window();
|
||||||
|
|
||||||
match user_event {
|
match user_event {
|
||||||
|
|||||||
Reference in new issue
Block a user