fixed hide window on startup for gnome-shell (Closes: #676361).
authorJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 11 Jul 2012 20:23:01 +0000 (20:23 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 11 Jul 2012 20:23:01 +0000 (20:23 +0000)
NEWS
src/main.c

diff --git a/NEWS b/NEWS
index 81ba02d..071e4a1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,12 @@
 * v0.6.2.18
+
 ** merged some chinese translation from LP.
 ** fixed some french translation typo.
 ** added degree sign for celcius (Closes LP: #1021900).
 ** added russian, brazilian, hungarian, serbian, slovenian,
    italian, ukrainian and german translation files
+** psensor: fixed hide window on startup for gnome-shell (Closes:
+   #676361).
 
 * v0.6.2.17
 
index fb534d8..5f0feee 100644 (file)
@@ -514,16 +514,16 @@ int main(int argc, char **argv)
        ui_appindicator_init(&ui);
 #endif
 
-       /*
-        * show the window as soon as all gtk events have been processed
-        * in order to ensure that the status icon is attempted to be
-        * drawn before. If not, there is no way to detect that it is
-        * visible.
-       */
-       g_idle_add((GSourceFunc)initial_window_show, &ui);
-
        gdk_notify_startup_complete();
 
+       /*
+        * hack, did not find a cleaner solution.
+        * wait 2s to ensure that the status icon is attempted to be
+        * drawn before determining whether the main window must be
+        * show.
+        */
+       g_timeout_add(2000,(GSourceFunc)initial_window_show, &ui);
+
        /* main loop */
        gtk_main();