diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-17 11:07:42 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-17 11:07:42 -0500 |
commit | f03a616c21c50ebfe75892627956f05fdb77b544 (patch) | |
tree | 637aa9d8d06341a88d1904bf6670779f6e99fd40 /src/shell.c | |
parent | 57cd0ed9164a325ef87aee55b21ac317dc0e6c9e (diff) |
shell: Set desktop-shell deathstamp at initial launch
Timestamp 0 is a valid timestamp and we can't use that as an uninitialized
timestamp.
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell.c b/src/shell.c index c0d8b8d..0dd4ba5 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1281,8 +1281,7 @@ desktop_shell_sigchld(struct weston_process *process, int status) /* if desktop-shell dies more than 5 times in 30 seconds, give up */ time = weston_compositor_get_time(); - if (shell->child.deathstamp == 0 || - time - shell->child.deathstamp > 30000) { + if (time - shell->child.deathstamp > 30000) { shell->child.deathstamp = time; shell->child.deathcount = 0; } @@ -1464,6 +1463,7 @@ shell_init(struct weston_compositor *ec) shell, bind_screensaver) == NULL) return -1; + shell->child.deathstamp = weston_compositor_get_time(); if (launch_desktop_shell_process(shell) != 0) return -1; |