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.
This commit is contained in:
parent
fd3f03580d
commit
ff664fd1d8
@ -828,10 +828,13 @@ shell_app_sync_running_state (ShellApp *app)
|
|||||||
{
|
{
|
||||||
g_return_if_fail (app->running_state != NULL);
|
g_return_if_fail (app->running_state != NULL);
|
||||||
|
|
||||||
if (app->running_state->interesting_windows == 0)
|
if (app->state != SHELL_APP_STATE_STARTING)
|
||||||
shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
|
{
|
||||||
else if (app->state != SHELL_APP_STATE_STARTING)
|
if (app->running_state->interesting_windows == 0)
|
||||||
shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
|
shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
|
||||||
|
else
|
||||||
|
shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user