mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
term_ptmx_{pause,resume}: return success/fail
This commit is contained in:
parent
54d637e2b4
commit
c5c97c2fd4
2 changed files with 14 additions and 14 deletions
24
terminal.c
24
terminal.c
|
|
@ -234,18 +234,6 @@ static struct timespec last = {0};
|
||||||
|
|
||||||
static bool cursor_blink_rearm_timer(struct terminal *term);
|
static bool cursor_blink_rearm_timer(struct terminal *term);
|
||||||
|
|
||||||
void
|
|
||||||
term_ptmx_pause(struct terminal *term)
|
|
||||||
{
|
|
||||||
fdm_event_del(term->fdm, term->ptmx, EPOLLIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
term_ptmx_resume(struct terminal *term)
|
|
||||||
{
|
|
||||||
fdm_event_add(term->fdm, term->ptmx, EPOLLIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Externally visible, but not declared in terminal.h, to enable pgo
|
/* Externally visible, but not declared in terminal.h, to enable pgo
|
||||||
* to call this function directly */
|
* to call this function directly */
|
||||||
bool
|
bool
|
||||||
|
|
@ -382,6 +370,18 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
term_ptmx_pause(struct terminal *term)
|
||||||
|
{
|
||||||
|
return fdm_event_del(term->fdm, term->ptmx, EPOLLIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
term_ptmx_resume(struct terminal *term)
|
||||||
|
{
|
||||||
|
return fdm_event_add(term->fdm, term->ptmx, EPOLLIN);
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
fdm_flash(struct fdm *fdm, int fd, int events, void *data)
|
fdm_flash(struct fdm *fdm, int fd, int events, void *data)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -810,8 +810,8 @@ void term_collect_urls(struct terminal *term);
|
||||||
void term_osc8_open(struct terminal *term, uint64_t id, const char *uri);
|
void term_osc8_open(struct terminal *term, uint64_t id, const char *uri);
|
||||||
void term_osc8_close(struct terminal *term);
|
void term_osc8_close(struct terminal *term);
|
||||||
|
|
||||||
void term_ptmx_pause(struct terminal *term);
|
bool term_ptmx_pause(struct terminal *term);
|
||||||
void term_ptmx_resume(struct terminal *term);
|
bool term_ptmx_resume(struct terminal *term);
|
||||||
|
|
||||||
static inline void term_reset_grapheme_state(struct terminal *term)
|
static inline void term_reset_grapheme_state(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue