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
This commit is contained in:
Marc-André Lureau 2013-03-20 16:43:28 +01:00
parent 1e810a543e
commit 081f2decbe

View File

@ -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"))