[virt-tools-list] [PATCH virt-viewer 3/4] window: resize to monitor geometry

Marc-André Lureau marcandre.lureau at gmail.com
Mon Mar 25 21:26:55 UTC 2013


This code is potentially bad, we should set size request to the size of the monitor
---
 src/virt-viewer-window.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 60bb527..1cd0eee 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -480,6 +480,13 @@ virt_viewer_window_move_to_monitor(VirtViewerWindow *self)
 
     gdk_screen_get_monitor_geometry(gdk_screen_get_default(), n, &mon);
     gtk_window_move(GTK_WINDOW(priv->window), mon.x, mon.y);
+#ifdef G_OS_WIN32
+    /* FIXME: on windows, fullscreen doesn't always hide the taskbar
+       See https://bugzilla.gnome.org/show_bug.cgi?id=652049 */
+    gtk_widget_set_size_request(GTK_WIDGET(priv->window),
+                                mon.width,
+                                mon.height);
+#endif
 }
 
 void
@@ -549,13 +556,6 @@ virt_viewer_window_enter_fullscreen(VirtViewerWindow *self, gint monitor)
     virt_viewer_window_move_to_monitor(self);
 
     gtk_window_fullscreen(GTK_WINDOW(priv->window));
-#ifdef G_OS_WIN32
-    /* on windows, fullscreen doesn't always hide the taskbar
-       See https://bugzilla.gnome.org/show_bug.cgi?id=652049 */
-    gtk_widget_set_size_request(GTK_WIDGET(priv->window),
-                                gdk_screen_width(),
-                                gdk_screen_height());
-#endif
 }
 
 #define MAX_KEY_COMBO 3
-- 
1.8.1.1.439.g50a6b54




More information about the virt-tools-list mailing list