[PATCH] virt-manager: make fullscreen mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
when a VM uses a video mode that is larger than the mode of the host running virt-manager fullscreen mode isn't particular useful at the moment. Since there are no scroll bars (due to _force_resize), parts of the screen simply get cut off. Attached patch sets the size of the vnc widget to the actual screen size (minus the height of the menu bar) when switching to fullscreen mode with scaling enabled. This makes things work much better for me.
Cheers,
-- Guido

gtk-vnc supports scaling down

so if in fullscreen mode and scaling is enabled set the size of the vnc widget
to the screensize (and substract the height of the menubar).

diff -r e1f1421138dc src/virtManager/details.py
--- a/src/virtManager/details.py	Thu Feb 19 15:23:01 2009 +0100
+++ b/src/virtManager/details.py	Thu Feb 19 15:54:38 2009 +0100
@@ -437,6 +441,16 @@
     def toggle_fullscreen(self, src):
         self.window.get_widget("control-fullscreen").set_active(src.get_active())
         if src.get_active():
+
+            # if scaling is enabled make sure we fit onto the root window
+            if self.vncViewer.get_scaling():
+                w, h = self.window.get_widget("menubar3").size_request() 
+                rootw = src.get_screen().get_width()
+                rooth = src.get_screen().get_height() - h
+                self.vncViewer.set_size_request(rootw, rooth)
+            else:
+                self.vncViewer.set_size_request(-1, -1)
+
             self.window.get_widget("vmm-details").fullscreen()
             if self.config.get_console_keygrab() == 1:
                 gtk.gdk.keyboard_grab(self.vncViewer.window, False, 0L)
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux