From fc2e385d876f53b260d1f8d80db2517b9f2e6e80 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 30 Apr 2020 17:22:57 +0200 Subject: term: don't enable ptmx FDM callback until Wayland window has been configured The way things works right now, we cannot enable the ptmx FDM callback right away. We need to wait for the Wayland window to have been configured. Before the window is configured, we don't have a size, and no grid. Thus, if we try to process ptmx data we'll crash since we have no where to write it to. So, registering the ptmx fd with the FDM is now delayed until we've received the first 'configure' event from Wayland. --- terminal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 7fcede70..7152bc23 100644 --- a/terminal.h +++ b/terminal.h @@ -444,6 +444,7 @@ bool term_font_size_reset(struct terminal *term); bool term_font_dpi_changed(struct terminal *term); void term_font_subpixel_changed(struct terminal *term); +void term_window_configured(struct terminal *term); void term_damage_rows(struct terminal *term, int start, int end); void term_damage_rows_in_view(struct terminal *term, int start, int end); -- cgit v1.3