mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-19 05:33:44 -04: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
|
bool
|
||||||
term_ptmx_pause(struct terminal *term)
|
term_ptmx_pause(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
if (term->ptmx < 0)
|
||||||
|
return false;
|
||||||
return fdm_event_del(term->fdm, term->ptmx, EPOLLIN);
|
return fdm_event_del(term->fdm, term->ptmx, EPOLLIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
term_ptmx_resume(struct terminal *term)
|
term_ptmx_resume(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
if (term->ptmx < 0)
|
||||||
|
return false;
|
||||||
return fdm_event_add(term->fdm, term->ptmx, EPOLLIN);
|
return fdm_event_add(term->fdm, term->ptmx, EPOLLIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue