virt-viewer: do not grab keyboard/mouse

This commit is contained in:
Mikhail Klementev 2020-01-22 00:50:54 +00:00
parent 44cb4697ec
commit 01a0d206db
No known key found for this signature in database
GPG Key ID: BE44DA8C062D87DC
3 changed files with 32 additions and 2 deletions

View File

@ -9,7 +9,10 @@
let let
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> {};
virt-manager-without-menu = pkgs.virt-viewer.overrideAttrs(x: { 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; in with pkgs;

View File

@ -1,7 +1,7 @@
From c26580442a4ac18f805b1795ec250d6cf5857a49 Mon Sep 17 00:00:00 2001 From c26580442a4ac18f805b1795ec250d6cf5857a49 Mon Sep 17 00:00:00 2001
From: Mikhail Klementev <blame@dumpstack.io> From: Mikhail Klementev <blame@dumpstack.io>
Date: Wed, 22 Jan 2020 00:25:16 +0000 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 +- src/resources/ui/virt-viewer.ui | 2 +-

View File

@ -0,0 +1,27 @@
From eac430d01f486e15b55d6fa992e77ded77bb4b1a Mon Sep 17 00:00:00 2001
From: Mikhail Klementev <blame@dumpstack.io>
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