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

@ -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);
}