mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
term: ptmx pause/resume: don't modify the FDM if ptmx has been closed
This fixes error message spam when resizing a terminal window executed with --hold, and where the client application has terminated.
This commit is contained in:
parent
6f9129fa3a
commit
2fe72effa9
1 changed files with 4 additions and 0 deletions
|
|
@ -387,12 +387,16 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
|
|||
bool
|
||||
term_ptmx_pause(struct terminal *term)
|
||||
{
|
||||
if (term->ptmx < 0)
|
||||
return false;
|
||||
return fdm_event_del(term->fdm, term->ptmx, EPOLLIN);
|
||||
}
|
||||
|
||||
bool
|
||||
term_ptmx_resume(struct terminal *term)
|
||||
{
|
||||
if (term->ptmx < 0)
|
||||
return false;
|
||||
return fdm_event_add(term->fdm, term->ptmx, EPOLLIN);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue