X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fmain.c;h=f5ff0b37f19c71556185322317e3b6e967bc0cf4;hb=e09566298bb2c44bed1d1401252fb7863c8d2de0;hp=19a01e6f0c07db80ecc19d6c362699d64662d95d;hpb=a8b3700d0c0a27d78a6f110f782bd7ba819afd15;p=psensor.git diff --git a/src/main.c b/src/main.c index 19a01e6..f5ff0b3 100644 --- a/src/main.c +++ b/src/main.c @@ -355,10 +355,16 @@ static gboolean initial_window_show(gpointer data) { struct ui_psensor *ui; + log_printf(LOG_DEBUG, "initial_window_show()"); + ui = (struct ui_psensor *)data; log_printf(LOG_DEBUG, - "is_status_supported: %d\n", is_status_supported()); + "is_status_supported: %d", is_status_supported()); + log_printf(LOG_DEBUG, + "is_appindicator_supported: %d", is_appindicator_supported()); + log_printf(LOG_DEBUG, + "hide_on_startup: %d", ui->config->hide_on_startup); if (!ui->config->hide_on_startup || (!is_appindicator_supported() && !is_status_supported())) @@ -470,14 +476,6 @@ int main(int argc, char **argv) /* sensor list */ ui_sensorlist_create(&ui); - /* - * 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); - thread = g_thread_create((GThreadFunc) update_psensor_measures, &ui, TRUE, &error); @@ -492,6 +490,14 @@ 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(); /* main loop */