- bnc#874594 - virt-manager allows issuing of start for xen domain

twice, resulting in failure
  virtman-prevent-double-click-starting-vm-twice.patch

- bnc#877907 - when starting guest in virt--manager with details
  pane open, keyboard is grabbed erroneously
  531e0a82-reverse-keyboard-grab-commit.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=173
This commit is contained in:
Charles Arnold 2014-05-15 23:33:17 +00:00 committed by Git OBS Bridge
parent e46dd08c33
commit 14d29e6c11
5 changed files with 173 additions and 1 deletions

View File

@ -0,0 +1,139 @@
Note: This is a reverse patch of the original commit
See bnc#877907 - when starting guest in virt--manager with details
pane open, keyboard is grabbed erroneously
Subject: Add a gsetting key to disable keyboard grabbing
From: Kjö Hansi Glaz kjo@a4nancy.net.eu.org Mon Mar 10 18:07:15 2014 +0100
Date: Mon Mar 10 14:54:58 2014 -0400:
Git: 66d146aceec7d6b4301f1795d8bea25d2d8306b8
Add a gsetting key to disable keyboard grabbing that works the same way
as spicy when unchecking "Options" > "Grab keyboard when active and
focused".
diff --git b/data/org.virt-manager.virt-manager.gschema.xml a/data/org.virt-manager.virt-manager.gschema.xml
index 2fede6c..d755f6e 100644
--- b/data/org.virt-manager.virt-manager.gschema.xml
+++ a/data/org.virt-manager.virt-manager.gschema.xml
@@ -188,13 +188,6 @@
<description>Grab keyboard sequence for the graphical console</description>
</key>
- <!--This key is not intended to be exposed in the UI yet-->
- <key name="grab-keyboard" type="b">
- <default>true</default>
- <summary>Enable grab keyboard when active and focused</summary>
- <description>Enable grab keyboard when active and focused</description>
- </key>
-
<key name="auto-redirect" type="b">
<default>true</default>
<summary>Enable SPICE Auto USB redirection in console window</summary>
diff --git b/virtManager/config.py a/virtManager/config.py
index 5c9c127..dd624e9 100644
--- b/virtManager/config.py
+++ a/virtManager/config.py
@@ -286,14 +286,6 @@ class vmmConfig(object):
def on_keys_combination_changed(self, cb):
return self.conf.notify_add("/console/grab-keys", cb)
- # This key is not intended to be exposed in the UI yet
- def get_grab_keyboard(self):
- return self.conf.get("/console/grab-keyboard")
- def set_grab_keyboard(self, val):
- self.conf.set("/console/grab-keyboard", val)
- def on_grab_keyboard_changed(self, cb):
- return self.conf.notify_add("/console/grab-keyboard", cb)
-
# Confirmation preferences
def get_confirm_forcepoweroff(self):
return self.conf.get("/confirm/forcepoweroff")
diff --git b/virtManager/console.py a/virtManager/console.py
index ee12390..6513645 100644
--- b/virtManager/console.py
+++ a/virtManager/console.py
@@ -360,9 +360,6 @@ class Viewer(vmmGObject):
def send_keys(self, keys):
raise NotImplementedError()
- def set_grab_keyboard(self):
- raise NotImplementedError()
-
def open_host(self, ginfo):
raise NotImplementedError()
@@ -397,7 +394,6 @@ class VNCViewer(Viewer):
def init_widget(self):
self.set_grab_keys()
- self.set_grab_keyboard()
self.display.realize()
@@ -407,6 +403,7 @@ class VNCViewer(Viewer):
self.console.sync_scaling_with_display()
self.console.refresh_resizeguest_from_settings()
+ self.display.set_keyboard_grab(True)
self.display.set_pointer_grab(True)
self.display.connect("size-allocate",
@@ -464,10 +461,6 @@ class VNCViewer(Viewer):
def send_keys(self, keys):
return self.display.send_keys([Gdk.keyval_from_name(k) for k in keys])
- def set_grab_keyboard(self):
- self.display.set_keyboard_grab(self.config.get_grab_keyboard())
- self.display.force_grab(self.config.get_grab_keyboard())
-
def _desktop_resize(self, src_ignore, w, h):
self.desktop_resolution = (w, h)
self.console.widget("console-gfx-scroll").queue_resize()
@@ -578,7 +571,6 @@ class SpiceViewer(Viewer):
def _init_widget(self):
self.set_grab_keys()
- self.set_grab_keyboard()
self.console.sync_scaling_with_display()
self.console.refresh_resizeguest_from_settings()
@@ -625,9 +617,6 @@ class SpiceViewer(Viewer):
return self.display.send_keys([Gdk.keyval_from_name(k) for k in keys],
SpiceClientGtk.DisplayKeyEvent.CLICK)
- def set_grab_keyboard(self):
- self.display.set_property("grab-keyboard", self.config.get_grab_keyboard())
-
def close(self):
if self.spice_session is not None:
self.spice_session.disconnect()
@@ -886,8 +875,6 @@ class vmmConsolePages(vmmGObjectUI):
self.config.on_console_accels_changed(self.set_enable_accel))
self.add_gconf_handle(
self.config.on_keys_combination_changed(self.grab_keys_changed))
- self.add_gconf_handle(
- self.config.on_grab_keyboard_changed(self.grab_keyboard_changed))
self.page_changed()
@@ -1040,9 +1027,6 @@ class vmmConsolePages(vmmGObjectUI):
def pointer_grabbed(self, src_ignore):
self.pointer_is_grabbed = True
self.change_title()
- if not self.config.get_grab_keyboard():
- self.viewer.display.force_grab(False)
- self.viewer.display.set_keyboard_grab(self.config.get_grab_keyboard())
def pointer_ungrabbed(self, src_ignore):
self.pointer_is_grabbed = False
@@ -1083,10 +1067,6 @@ class vmmConsolePages(vmmGObjectUI):
if self.viewer:
self.viewer.set_grab_keys()
- def grab_keyboard_changed(self):
- if self.viewer:
- self.viewer.set_grab_keyboard()
-
def set_enable_accel(self):
# Make sure modifiers are up to date
self.viewer_focus_changed()

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu May 15 15:41:54 MDT 2014 - carnold@suse.com
- bnc#874594 - virt-manager allows issuing of start for xen domain
twice, resulting in failure
virtman-prevent-double-click-starting-vm-twice.patch
-------------------------------------------------------------------
Thu May 15 15:41:54 MDT 2014 - carnold@suse.com
- bnc#877907 - when starting guest in virt--manager with details
pane open, keyboard is grabbed erroneously
531e0a82-reverse-keyboard-grab-commit.patch
-------------------------------------------------------------------
Thu May 1 16:24:54 MDT 2014 - carnold@suse.com

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define with_guestfs 0
%define askpass_package "openssh-askpass"
%define qemu_user "qemu"
@ -60,6 +61,7 @@ Patch22: 535ff0b7-fix-install-when-one-package-is-already-installed.patch
Patch23: 536152fe-fix-error-detecting-OS-in-show-all-list.patch
Patch24: 536154d8-show-error-if-launching-delete-dialog-fails.patch
Patch25: 53615662-call-path_exists-before-getting-storage-volume.patch
Patch45: 531e0a82-reverse-keyboard-grab-commit.patch
Patch50: virtman-desktop.patch
Patch51: virtman-cdrom.patch
Patch52: virtman-kvm.patch
@ -78,6 +80,7 @@ Patch66: virtman-load-stored-uris.patch
Patch67: virtman-libvirtd-not-running.patch
Patch68: virtman-stable-os-support.patch
Patch69: virtman-add-s390x-arch-support.patch
Patch70: virtman-prevent-double-click-starting-vm-twice.patch
Patch151: virtinst-storage-ocfs2.patch
Patch152: virtinst-qed.patch
Patch153: virtinst-support-suse-distros.patch
@ -202,6 +205,7 @@ machine).
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch45 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
@ -220,6 +224,7 @@ machine).
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch151 -p1
%patch152 -p1
%patch153 -p1

View File

@ -2,7 +2,7 @@ Index: virt-manager-1.0.1/virtManager/console.py
===================================================================
--- virt-manager-1.0.1.orig/virtManager/console.py
+++ virt-manager-1.0.1/virtManager/console.py
@@ -935,6 +935,16 @@ class vmmConsolePages(vmmGObjectUI):
@@ -922,6 +922,16 @@ class vmmConsolePages(vmmGObjectUI):
make_item("Ctrl+Alt+_Backspace", ["Control_L", "Alt_L", "BackSpace"])
make_item("Ctrl+Alt+_Delete", ["Control_L", "Alt_L", "Delete"])
menu.add(Gtk.SeparatorMenuItem())

View File

@ -0,0 +1,14 @@
bnc#874594 - virt-manager allows issuing of start for xen domain twice, resulting in failure
--- virt-manager-1.0.1/virtManager/details.py.orig 2014-05-15 17:04:23.580176420 -0600
+++ virt-manager-1.0.1/virtManager/details.py 2014-05-15 17:07:55.444521681 -0600
@@ -1459,6 +1459,9 @@ class vmmDetails(vmmGObjectUI):
self.widget("details-menu-usb-redirection").set_sensitive(can_usb)
def control_vm_run(self, src_ignore):
+ # De-sensitize widget so a double click on the icon won't attempt to
+ # start the VM twice
+ self.widget("control-run").set_sensitive(False)
self.emit("action-run-domain",
self.vm.conn.get_uri(), self.vm.get_uuid())