From: Sergio Villar Senin Date: Tue, 2 Jun 2009 15:14:08 +0000 (+0200) Subject: Fixes NB#119126, show new email notification if the screen is off even if the applica... X-Git-Tag: 3.0.17-rc10~11 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=588b6c9779f0de4b0b63c685aa2b74efd1fb09df;p=modest Fixes NB#119126, show new email notification if the screen is off even if the application is in the foreground --- diff --git a/src/hildon2/modest-platform.c b/src/hildon2/modest-platform.c index 786578a..3161437 100644 --- a/src/hildon2/modest-platform.c +++ b/src/hildon2/modest-platform.c @@ -1561,11 +1561,18 @@ void modest_platform_on_new_headers_received (GList *URI_list, gboolean show_visual) { - if (g_list_length (URI_list) == 0) + gboolean screen_on, app_in_foreground; + + /* Get the window status */ + app_in_foreground = hildon_program_get_is_topmost (hildon_program_get_instance ()); + screen_on = modest_window_mgr_screen_is_on (modest_runtime_get_window_mgr ()); + + /* If the screen is on and the app is in the + foreground we don't show anything */ + if (screen_on && app_in_foreground) return; - /* If the window is in the foreground don't do anything */ - if (hildon_program_get_is_topmost (hildon_program_get_instance ())) + if (g_list_length (URI_list) == 0) return; #ifdef MODEST_HAVE_HILDON_NOTIFY