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.
This commit is contained in:
Jonathon Jongsma 2013-10-18 11:18:37 -05:00 committed by Christophe Fergeau
parent 9945ffde5b
commit 34bbb275a6

View File

@ -516,6 +516,7 @@ mapped(GtkWidget *widget, GdkEvent *event G_GNUC_UNUSED,
VirtViewerWindow *self)
{
g_signal_handlers_disconnect_by_func(widget, mapped, self);
self->priv->fullscreen = FALSE;
virt_viewer_window_enter_fullscreen(self, self->priv->fullscreen_monitor);
return FALSE;
}
@ -531,14 +532,13 @@ virt_viewer_window_enter_fullscreen(VirtViewerWindow *self, gint monitor)
return;
priv->fullscreen_monitor = monitor;
priv->fullscreen = TRUE;
if (!gtk_widget_get_mapped(priv->window)) {
g_signal_connect(priv->window, "map-event", G_CALLBACK(mapped), self);
return;
}
priv->fullscreen = TRUE;
gtk_check_menu_item_set_active(check, TRUE);
gtk_widget_hide(menu);
gtk_widget_show(priv->toolbar);