Commit 8e2899f5 authored by Guido Günther's avatar Guido Günther

make fullscreen mode more usful

if the guests resolution is large then the one of the host.
parent 24b33f6f
From: =?utf-8?q?Guido=20G=C3=BCnther?= <>
Date: Thu, 19 Feb 2009 16:11:34 +0100
Subject: [PATCH] make fullscreen mode more useful
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. This 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.
src/virtManager/ | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/virtManager/ b/src/virtManager/
index 2337516..94a31c8 100644
--- a/src/virtManager/
+++ b/src/virtManager/
@@ -438,6 +438,16 @@ class vmmDetails(gobject.GObject):
def toggle_fullscreen(self, src):
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)
if self.config.get_console_keygrab() == 1:
gtk.gdk.keyboard_grab(self.vncViewer.window, False, 0L)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment