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

[virt-tools-list] [PATCH virt-viewer] 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.

 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 ff94c77..11d6985 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) {
-        gtk_window_present(virt_viewer_window_get_window(win));
     } else {
         if (win != self->priv->main_window &&

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