From 081f2decbe026277548834fa7a9f421de8dec3af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 20 Mar 2013 16:43:28 +0100 Subject: [PATCH] Remove gtk_window_present() call gtk_window_present() may forcefully call gdk_window_show(), which will call ShowWindow(). Although gdk call is not supposed to move the window if it's already visible, it does restore the window position on Vista+. For example, a snapped window will be moved back to its previous position. Gtk+ ShowWindow() is currently using SW_SHOWNOACTIVATE, it should probably use SW_SHOWNA instead, but that didn't help anyway for a snapped window. Since virt_viewer_window_show() already ensure the window is visible, I am not sure why gtk_window_present() is there in the first place, so just remove it. https://bugzilla.redhat.com/show_bug.cgi?id=912713 --- src/virt-viewer-app.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c index 7461b3c..de4b640 100644 --- a/src/virt-viewer-app.c +++ b/src/virt-viewer-app.c @@ -674,7 +674,6 @@ display_show_hint(VirtViewerDisplay *display, } else if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY) { virt_viewer_notebook_show_display(nb); virt_viewer_window_show(win); - gtk_window_present(virt_viewer_window_get_window(win)); } else { if (win != self->priv->main_window && g_getenv("VIRT_VIEWER_HIDE"))