Index: virt-manager-0.4.0/src/virtManager/console.py =================================================================== --- virt-manager-0.4.0.orig/src/virtManager/console.py +++ virt-manager-0.4.0/src/virtManager/console.py @@ -49,6 +49,8 @@ class vmmConsole(gobject.GObject): self.vm = vm topwin = self.window.get_widget("vmm-console") + sens = (self.window.get_widget("menubar2"), + self.window.get_widget("console-toolbar")) topwin.hide() self.title = vm.get_name() + " " + topwin.get_title() topwin.set_title(self.title) @@ -56,9 +58,9 @@ class vmmConsole(gobject.GObject): self.window.get_widget("control-shutdown").get_icon_widget().set_from_file(config.get_icon_dir() + "/icon_shutdown.png") if self.config.get_console_keygrab() == 2: - self.vncViewer = GRFBViewer(topwin, autograbkey=True) + self.vncViewer = GRFBViewer(topwin, sens, autograbkey=True) else: - self.vncViewer = GRFBViewer(topwin, autograbkey=False) + self.vncViewer = GRFBViewer(topwin, sens, autograbkey=False) self.vncViewer.connect("pointer-grabbed", self.notify_grabbed) self.vncViewer.connect("pointer-ungrabbed", self.notify_ungrabbed) Index: virt-manager-0.4.0/src/vncViewer/vnc.py =================================================================== --- virt-manager-0.4.0.orig/src/vncViewer/vnc.py +++ virt-manager-0.4.0/src/vncViewer/vnc.py @@ -190,7 +190,7 @@ class GRFBViewer(gtk.DrawingArea): "keyboard-ungrabbed": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []), } - def __init__(self, topwin, autograbkey=False): + def __init__(self, topwin, sens, autograbkey=False): gtk.DrawingArea.__init__(self) self.fb = GRFBFrameBuffer(self) @@ -200,6 +200,7 @@ class GRFBViewer(gtk.DrawingArea): self.autograbkey = autograbkey self.autograbptr = True self.topwin = topwin + self.sens = sens self.accel_groups = gtk.accel_groups_from_object(topwin) self.preferred_encoding = (rfb.ENCODING_RAW, rfb.ENCODING_DESKTOP_RESIZE) # Current impl of draw_solid is *far* too slow to be practical @@ -460,6 +461,8 @@ class GRFBViewer(gtk.DrawingArea): gtk.gdk.keyboard_grab(self.window, False, long(0)) for g in self.accel_groups: self.topwin.remove_accel_group(g) + for w in self.sens: + w.set_sensitive(False) self.gtk_settings = gtk.settings_get_default() self.gtk_settings_accel = self.gtk_settings.get_property('gtk-menu-bar-accel') self.gtk_settings.set_property('gtk-menu-bar-accel', None) @@ -470,6 +473,8 @@ class GRFBViewer(gtk.DrawingArea): gtk.gdk.keyboard_ungrab() for g in self.accel_groups: self.topwin.add_accel_group(g) + for w in self.sens: + w.set_sensitive(True) self.gtk_settings.set_property('gtk-menu-bar-accel', self.gtk_settings_accel) self.grabbedKeyboard = False self.emit("keyboard-ungrabbed")