[Spice-devel] [PATCH spice 3/3] spicec: Don't show gui when connection info is specified on the cmdline

Hans de Goede hdegoede at redhat.com
Tue Nov 9 02:48:03 PST 2010


Currently when compiled with the gui enabled if you specify a host to connect
to on the cmdline the gui flashes by (show_gui gets called, then the connect
handler calls hide_gui as soon as the connection is made).

This patch removes this ugly flashing by of the gui.
---
 client/application.cpp |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/client/application.cpp b/client/application.cpp
index 2701641..4b22e1f 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -602,14 +602,12 @@ void Application::on_start_running()
     }
     //FIXME: _client.connect() or use the following instead?
 #ifdef USE_GUI
-    if (_gui_mode != GUI_MODE_FULL) {
-        connect();
+    if (_gui_mode == GUI_MODE_FULL) {
+        show_gui();
+        return;
     }
-
-    show_gui();
-#else
-    connect();
 #endif // HAVE_GUI
+    connect();
 }
 
 RedScreen* Application::find_screen(int id)
-- 
1.7.3.2



More information about the Spice-devel mailing list