aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
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.c
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.c')
-rw-r--r--terminal.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/terminal.c b/terminal.c
index ebc27b3c..7fc177f0 100644
--- a/terminal.c
+++ b/terminal.c
@@ -199,7 +199,7 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
*/
if (term->window->frame_callback == NULL) {
if (term->render.app_sync_updates.enabled)
- term->render.refresh_needed = true;
+ term->render.refresh.grid = true;
else {
/* First timeout - reset each time we receive input. */
@@ -235,7 +235,7 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
}
}
} else
- term->render.pending = true;
+ term->render.pending.grid = true;
if (hup) {
if (term->hold_at_exit) {
@@ -1637,10 +1637,7 @@ term_visual_focus_in(struct terminal *term)
if (term->cursor_blink.active)
cursor_blink_start_timer(term);
- quirk_weston_csd_on(term);
- render_csd(term);
- quirk_weston_csd_off(term);
-
+ render_refresh_csd(term);
cursor_refresh(term);
}
@@ -1654,10 +1651,7 @@ term_visual_focus_out(struct terminal *term)
if (term->cursor_blink.active)
cursor_blink_stop_timer(term);
- quirk_weston_csd_on(term);
- render_csd(term);
- quirk_weston_csd_off(term);
-
+ render_refresh_csd(term);
cursor_refresh(term);
}