aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-10-09 14:16:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-10-10 15:19:18 +0000
commitc5c97c2fd4a674d0fcce16d40e0e56994195e9b0 (patch)
treeb6741134751e6490c1d829dbb10cd2f6cc206d4f
parentterm: ptmx: don’t consume anything while doing an interactive resize (diff)
term_ptmx_{pause,resume}: return success/fail
-rw-r--r--terminal.c24
-rw-r--r--terminal.h4
2 files changed, 14 insertions, 14 deletions
diff --git a/terminal.c b/terminal.c
index 4fb13f44..16486d82 100644
--- a/terminal.c
+++ b/terminal.c
@@ -234,18 +234,6 @@ static struct timespec last = {0};
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
* to call this function directly */
bool
@@ -382,6 +370,18 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
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
fdm_flash(struct fdm *fdm, int fd, int events, void *data)
{
diff --git a/terminal.h b/terminal.h
index 7a281e72..16c8e776 100644
--- a/terminal.h
+++ b/terminal.h
@@ -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_close(struct terminal *term);
-void term_ptmx_pause(struct terminal *term);
-void term_ptmx_resume(struct terminal *term);
+bool term_ptmx_pause(struct terminal *term);
+bool term_ptmx_resume(struct terminal *term);
static inline void term_reset_grapheme_state(struct terminal *term)
{