<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 25, 2014 at 5:58 PM, Jonathon Jongsma <span dir="ltr"><<a href="mailto:jjongsma@redhat.com" target="_blank">jjongsma@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Previously, the fullscreen floating toolbar and the "toggle-fullscreen"<br>
hotkey (which maps to the menu item action) had slightly different<br>
methods of exiting fullscreen. The floating toolbar method unset the<br>
'fullscreen' property on the application (which causes all windows to<br>
simultaneously exit fullscreen), whereas the hotkey did not. This had a<br>
side-effect of preventing the display from auto re-sizing if it was<br>
fullscreened again.  After this change, both the hotkey and the toolbar<br>
button will unset the application-level 'fullscreen' property when<br>
exiting fullscreen mode.<br>
<br>
Resolves: rhbz#1022608<br>
---<br>
 src/virt-viewer-window.c | 21 ++++++++++++++-------<br>
 1 file changed, 14 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c<br>
index fa04a97..a9c9442 100644<br>
--- a/src/virt-viewer-window.c<br>
+++ b/src/virt-viewer-window.c<br>
@@ -829,16 +829,26 @@ virt_viewer_window_menu_file_quit(GtkWidget *src G_GNUC_UNUSED,<br>
 }<br>
<br>
<br>
-static void<br>
-virt_viewer_window_toolbar_leave_fullscreen(GtkWidget *button G_GNUC_UNUSED,<br>
-                                            VirtViewerWindow *self)<br>
+static void virt_viewer_window_set_fullscreen(VirtViewerWindow *self,<br>
+                                              gboolean fullscreen)<br>
 {<br>
+    if (fullscreen) {<br>
+        virt_viewer_window_enter_fullscreen(self, -1);<br>
+    } else {<br>
     /* leave all windows fullscreen state */<br>
     if (virt_viewer_app_get_fullscreen(self->priv->app))<br>
         g_object_set(self->priv->app, "fullscreen", FALSE, NULL);<br>
     /* or just this window */<br>
     else<br>
         virt_viewer_window_leave_fullscreen(self);<br>
+    }<br></blockquote><div><br></div><div>Please, just indent the whole block inside the added else. Or do something like:</div><div>if (fullscreen) {</div><div>   /* some code */</div><div>   return;</div><div>}</div><div><br></div><div>(whatever is your preference ...)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+}<br>
+<br>
+static void<br>
+virt_viewer_window_toolbar_leave_fullscreen(GtkWidget *button G_GNUC_UNUSED,<br>
+                                            VirtViewerWindow *self)<br>
+{<br>
+    virt_viewer_window_set_fullscreen(self, FALSE);<br>
 }<br>
<br>
 static void keycombo_menu_location(GtkMenu *menu G_GNUC_UNUSED, gint *x, gint *y,<br>
@@ -875,10 +885,7 @@ virt_viewer_window_menu_view_fullscreen(GtkWidget *menu,<br>
 {<br>
     gboolean fullscreen = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu));<br>
<br>
-    if (fullscreen)<br>
-        virt_viewer_window_enter_fullscreen(self, -1);<br>
-    else<br>
-        virt_viewer_window_leave_fullscreen(self);<br>
+    virt_viewer_window_set_fullscreen(self, fullscreen);<br>
 }<br>
<br>
 static void add_if_writable (GdkPixbufFormat *data, GHashTable *formats)<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.3<br>
<br>
_______________________________________________<br>
virt-tools-list mailing list<br>
<a href="mailto:virt-tools-list@redhat.com">virt-tools-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/virt-tools-list" target="_blank">https://www.redhat.com/mailman/listinfo/virt-tools-list</a><br>
</font></span></blockquote></div><br><br clear="all"><div>apart from the comments, ACK!</div>-- <br><div>Fabiano Fidêncio</div>
</div></div>