render: never render CSD and/or search box "immediately"

Handle the CSDs and the search box the same way we handle the main
grid; when we need to redraw them, call
render_refresh_{csd,search}(). This sets a flag that is checked after
each FDM iteration. All actual rendering is done here.

This also ties the commits of the Wayland sub-surfaces to the commit
of the main surface.
This commit is contained in:
Daniel Eklöf 2020-03-06 19:16:54 +01:00
parent e5540a0d2e
commit c5a1af4e53
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 118 additions and 81 deletions

View file

@ -331,7 +331,20 @@ struct terminal {
enum term_surface active_surface;
struct {
bool refresh_needed; /* Terminal needs to be re-rendered, as soon-as-possible */
/* Scheduled for rendering, as soon-as-possible */
struct {
bool grid;
bool csd;
bool search;
} refresh;
/* Scheduled for rendering, in the next frame callback */
struct {
bool grid;
bool csd;
bool search;
} pending;
int scrollback_lines; /* Number of scrollback lines, from conf (TODO: move out from render struct?) */
struct {
@ -358,7 +371,6 @@ struct terminal {
struct cell *cell; /* For easy access to content */
} last_cursor;
bool pending; /* Need to re-render again, after next frame-callback */
struct buffer *last_buf; /* Buffer we rendered to last time */
bool was_flashing; /* Flash was active last time we rendered */
bool was_searching;