From 01a0d206db61a346aa0a408b57e9dcccffa7fc63 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Wed, 22 Jan 2020 00:50:54 +0000 Subject: [PATCH] virt-viewer: do not grab keyboard/mouse --- default.nix | 5 +++- patches/0001-Remove-menu-bar.patch | 2 +- patches/0002-Do-not-grab-keyboard-mouse.patch | 27 +++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 patches/0002-Do-not-grab-keyboard-mouse.patch diff --git a/default.nix b/default.nix index 59f2465..f9ebdd4 100644 --- a/default.nix +++ b/default.nix @@ -9,7 +9,10 @@ let pkgs = import {}; virt-manager-without-menu = pkgs.virt-viewer.overrideAttrs(x: { - patches = [ ./patches/0001-Remove-menu-bar.patch ]; + patches = [ + ./patches/0001-Remove-menu-bar.patch + ./patches/0002-Do-not-grab-keyboard-mouse.patch + ]; }); in with pkgs; diff --git a/patches/0001-Remove-menu-bar.patch b/patches/0001-Remove-menu-bar.patch index 2eab1a2..7ff8d60 100644 --- a/patches/0001-Remove-menu-bar.patch +++ b/patches/0001-Remove-menu-bar.patch @@ -1,7 +1,7 @@ From c26580442a4ac18f805b1795ec250d6cf5857a49 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Wed, 22 Jan 2020 00:25:16 +0000 -Subject: [PATCH] Remove menu bar +Subject: [PATCH 1/2] Remove menu bar --- src/resources/ui/virt-viewer.ui | 2 +- diff --git a/patches/0002-Do-not-grab-keyboard-mouse.patch b/patches/0002-Do-not-grab-keyboard-mouse.patch new file mode 100644 index 0000000..314d66d --- /dev/null +++ b/patches/0002-Do-not-grab-keyboard-mouse.patch @@ -0,0 +1,27 @@ +From eac430d01f486e15b55d6fa992e77ded77bb4b1a Mon Sep 17 00:00:00 2001 +From: Mikhail Klementev +Date: Wed, 22 Jan 2020 00:41:34 +0000 +Subject: [PATCH 2/2] Do not grab keyboard/mouse + +--- + src/virt-viewer-display-spice.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c +index 311178b..8e68de2 100644 +--- a/src/virt-viewer-display-spice.c ++++ b/src/virt-viewer-display-spice.c +@@ -307,8 +307,8 @@ virt_viewer_display_spice_new(VirtViewerSessionSpice *session, + gtk_container_add(GTK_CONTAINER(self), GTK_WIDGET(self->priv->display)); + gtk_widget_show(GTK_WIDGET(self->priv->display)); + g_object_set(self->priv->display, +- "grab-keyboard", TRUE, +- "grab-mouse", TRUE, ++ "grab-keyboard", FALSE, ++ "grab-mouse", FALSE, + "resize-guest", FALSE, + "scaling", TRUE, + NULL); +-- +2.23.1 +