Repository: zng-ui/zng (language: rust)

Issue:
Review Android multi windows
What happens when multiple windows are requested?


Discussion / hints:
Winit returns a new window instance, but with same ID and same [`NativeWindow`](https://docs.rs/ndk/0.9.0/ndk/native_window/struct.NativeWindow.html) backend.

We need to implement an error on create window, for this release, later implement some sort of "iframe" API

Fix patch:
diff --git a/crates/zng-view/src/lib.rs b/crates/zng-view/src/lib.rs
index 180df1329..f46748a8d 100644
--- a/crates/zng-view/src/lib.rs
+++ b/crates/zng-view/src/lib.rs
@@ -1675,6 +1675,12 @@ impl Api for App {
         } else {
             self.assert_resumed();
 
+            #[cfg(target_os = "android")]
+            if !self.windows.is_empty() {
+                tracing::error!("android can only have one window");
+                return;
+            }
+
             let id = config.id;
             let win = Window::open(
                 self.generation,


Test patch: