aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-06 18:16:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-06 18:16:54 +0000
commitc5a1af4e534f0f290ea885b221d7d37d020ac994 (patch)
tree6562a6351daa3e35e11c81ae887f45b473889c5e /terminal.h
parentrender: csd: improved look of minimize/maximize/close buttons (diff)
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.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/terminal.h b/terminal.h
index 3731ee0d..92082d8c 100644
--- a/terminal.h
+++ b/terminal.h
@@ -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;