From 25537268d15a7ebddc9606da965f4fdc488c1dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sun, 21 Feb 2021 23:27:31 +0400 Subject: [PATCH] gtk: make app non-unique MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau --- qemu-gtk4/src/application.rs | 2 +- qemu-gtk4/src/console.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-gtk4/src/application.rs b/qemu-gtk4/src/application.rs index 2963ef4..2bbc9ff 100644 --- a/qemu-gtk4/src/application.rs +++ b/qemu-gtk4/src/application.rs @@ -92,7 +92,7 @@ impl QemuApplication { pub fn new() -> Self { glib::Object::new(&[ ("application-id", &Some(config::APP_ID)), - ("flags", &ApplicationFlags::empty()), + ("flags", &ApplicationFlags::NON_UNIQUE), ]) .expect("Application initialization failed...") } diff --git a/qemu-gtk4/src/console.rs b/qemu-gtk4/src/console.rs index 065f3c2..e8e1967 100644 --- a/qemu-gtk4/src/console.rs +++ b/qemu-gtk4/src/console.rs @@ -192,6 +192,7 @@ impl QemuConsole { }), ); priv_.console.set(console).unwrap(); + priv_.area.grab_focus(); } fn qemu_console(&self) -> &Console {