mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: term_shutdown(): set exit value in wayland
This commit is contained in:
parent
1ed78ab443
commit
644585a3e5
1 changed files with 7 additions and 5 deletions
12
terminal.c
12
terminal.c
|
|
@ -529,6 +529,7 @@ fdm_shutdown(struct fdm *fdm, int fd, int events, void *data)
|
|||
{
|
||||
LOG_DBG("FDM shutdown");
|
||||
struct terminal *term = data;
|
||||
struct wayland *wayl = term->wl;
|
||||
|
||||
fdm_del(term->fdm, fd);
|
||||
close(fd);
|
||||
|
|
@ -538,17 +539,18 @@ fdm_shutdown(struct fdm *fdm, int fd, int events, void *data)
|
|||
* trigger, meaning it should be safe to destroy the terminal.
|
||||
*/
|
||||
|
||||
assert(term->wl->focused != term);
|
||||
assert(term->wl->moused != term);
|
||||
assert(wayl->focused != term);
|
||||
assert(wayl->moused != term);
|
||||
|
||||
tll_foreach(term->wl->terms, it) {
|
||||
tll_foreach(wayl->terms, it) {
|
||||
if (it->item == term) {
|
||||
tll_remove(term->wl->terms, it);
|
||||
tll_remove(wayl->terms, it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
term_destroy(term);
|
||||
wayl->last_exit_value = term_destroy(term);
|
||||
LOG_WARN("last-exit-value: %d", wayl->last_exit_value);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue