From 7ad45305d63d644a1d9e119de2495278a00ecb40 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Wed, 11 Jul 2012 20:23:01 +0000 Subject: [PATCH] fixed hide window on startup for gnome-shell (Closes: #676361). --- NEWS | 3 +++ src/main.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 81ba02d..071e4a1 100644 --- 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 diff --git a/src/main.c b/src/main.c index fb534d8..5f0feee 100644 --- a/src/main.c +++ b/src/main.c @@ -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(); -- 2.7.4