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

[virt-tools-list] [PATCH virt-viewer 2/2] Remove restore window location code



It turns out gdk on win32 already restores properly the window
size/positon when leaving fullscreen. On non-win32, the WM should
do the job.

This solves the first window having too small size after leaving fullscreen:
https://bugzilla.redhat.com/show_bug.cgi?id=978362
---
 src/virt-viewer-window.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 645edb1..d5e8d64 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -96,7 +96,6 @@ struct _VirtViewerWindowPrivate {
     GSList *accel_list;
     gboolean enable_mnemonics_save;
     gboolean grabbed;
-    GdkRectangle before_fullscreen;
     gint fullscreen_monitor;
     gboolean desktop_resize_pending;
     gboolean kiosk;
@@ -478,12 +477,6 @@ virt_viewer_window_leave_fullscreen(VirtViewerWindow *self)
     gtk_widget_set_size_request(GTK_WIDGET(priv->window), -1, -1);
     gtk_window_unfullscreen(GTK_WINDOW(priv->window));
 
-    gtk_window_move(GTK_WINDOW(priv->window),
-                    priv->before_fullscreen.x,
-                    priv->before_fullscreen.y);
-    gtk_window_resize(GTK_WINDOW(priv->window),
-                      priv->before_fullscreen.width,
-                      priv->before_fullscreen.height);
 }
 
 static gboolean
@@ -514,13 +507,6 @@ virt_viewer_window_enter_fullscreen(VirtViewerWindow *self, gint monitor)
 
     priv->fullscreen = TRUE;
 
-    gtk_window_get_position(GTK_WINDOW(priv->window),
-                            &priv->before_fullscreen.x,
-                            &priv->before_fullscreen.y);
-    gtk_window_get_size(GTK_WINDOW(priv->window),
-                        &priv->before_fullscreen.width,
-                        &priv->before_fullscreen.height);
-
     gtk_check_menu_item_set_active(check, TRUE);
     gtk_widget_hide(menu);
     gtk_widget_show(priv->toolbar);
-- 
1.8.3.rc1.49.g8d97506


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