mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
render: resize: ignore ptmx read events during interactive resize
This commit is contained in:
parent
3565cbd636
commit
f4f1989b6e
3 changed files with 19 additions and 0 deletions
4
render.c
4
render.c
|
|
@ -3700,6 +3700,8 @@ delayed_reflow_of_normal_grid(struct terminal *term)
|
||||||
|
|
||||||
if (term->grid == &term->normal)
|
if (term->grid == &term->normal)
|
||||||
term_damage_view(term);
|
term_damage_view(term);
|
||||||
|
|
||||||
|
term_ptmx_resume(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
@ -3939,6 +3941,7 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
term->normal = g;
|
term->normal = g;
|
||||||
|
term_ptmx_pause(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Screen rows/cols before resize */
|
/* Screen rows/cols before resize */
|
||||||
|
|
@ -4028,6 +4031,7 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
||||||
|
|
||||||
term->render.resizing.grid = NULL;
|
term->render.resizing.grid = NULL;
|
||||||
term->render.resizing.screen_rows = 0;
|
term->render.resizing.screen_rows = 0;
|
||||||
|
term_ptmx_resume(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct coord *const tracking_points[] = {
|
struct coord *const tracking_points[] = {
|
||||||
|
|
|
||||||
12
terminal.c
12
terminal.c
|
|
@ -233,6 +233,18 @@ 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
|
||||||
|
|
|
||||||
|
|
@ -810,6 +810,9 @@ 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);
|
||||||
|
void 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)
|
||||||
{
|
{
|
||||||
#if defined(FOOT_GRAPHEME_CLUSTERING)
|
#if defined(FOOT_GRAPHEME_CLUSTERING)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue