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

[virt-tools-list] [PATCH] Set Spice display to fullscreen if owning window is pending fullscreen



When you call virt_viewer_window_enter_fullscreen() on a hidden window, it
didn't actually change its fullscreen state.  Instead, it sets up a map-event
handler to enter fullscreen after it is shown. When _set_display() is called on
a window that is pending fullscreen status, it initially sets the fullscreen
state of the display to FALSE, which can cause an unwanted resize to be sent
down to the guest. This patch changes the behavior to set its fullscreen state
to TRUE even before the window is shown.
---
 src/virt-viewer-window.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 0f62feb..9d7b0cf 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -516,6 +516,7 @@ mapped(GtkWidget *widget, GdkEvent *event G_GNUC_UNUSED,
        VirtViewerWindow *self)
 {
     g_signal_handlers_disconnect_by_func(widget, mapped, self);
+    priv->fullscreen = FALSE;
     virt_viewer_window_enter_fullscreen(self, self->priv->fullscreen_monitor);
     return FALSE;
 }
@@ -533,6 +534,7 @@ virt_viewer_window_enter_fullscreen(VirtViewerWindow *self, gint monitor)
     priv->fullscreen_monitor = monitor;
 
     if (!gtk_widget_get_mapped(priv->window)) {
+        priv->fullscreen = TRUE;
         g_signal_connect(priv->window, "map-event", G_CALLBACK(mapped), self);
         return;
     }
-- 
1.8.3.1


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