[gnome-shell] shell-app: Track the starting state correctly
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell-app: Track the starting state correctly
- Date: Thu, 16 Jul 2015 22:22:46 +0000 (UTC)
commit ff664fd1d89275a993e23ec7cf280fdf8c77001c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jul 16 15:20:23 2015 -0700
shell-app: Track the starting state correctly
Apps that are starting might have uninteresting windows like splash
screens pop up and then go away (like LibreOffice), even when
startup-notification hasn't completed yet. In those cases, we don't
want to transition the app back to stopped -- it should remain in
the running state.
src/shell-app.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 9c03a4a..ca367b1 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -828,10 +828,13 @@ shell_app_sync_running_state (ShellApp *app)
{
g_return_if_fail (app->running_state != NULL);
- if (app->running_state->interesting_windows == 0)
- shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
- else if (app->state != SHELL_APP_STATE_STARTING)
- shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
+ if (app->state != SHELL_APP_STATE_STARTING)
+ {
+ if (app->running_state->interesting_windows == 0)
+ shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
+ else
+ shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]