mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-07 08:21:02 -04:00
search: work around Sway sub-surface unmap bug
Unmapping a sub-surface in Sway does not damage the underlying surface. As a result, "committing" a scrollback search will typically leave most of the foot window dimmed. It can be seen when "cancelling" a search as well, but there it's less obvious - only the margins are left dimmed. This is because cancelling a search damaged the current viewport (something that shouldn't be needed). Out of sway, river, weston and mutter, only Sway needs this workaround. This is a workaround for https://github.com/swaywm/sway/issues/6960
This commit is contained in:
parent
57543c4290
commit
1e87dbc4dc
1 changed files with 5 additions and 1 deletions
6
search.c
6
search.c
|
|
@ -116,6 +116,11 @@ search_cancel_keep_selection(struct terminal *term)
|
||||||
|
|
||||||
term_xcursor_update(term);
|
term_xcursor_update(term);
|
||||||
render_refresh(term);
|
render_refresh(term);
|
||||||
|
|
||||||
|
/* Work around Sway bug - unmapping a sub-surface does not damage
|
||||||
|
* the underlying surface */
|
||||||
|
term_damage_margins(term);
|
||||||
|
term_damage_view(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -795,7 +800,6 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
grid->view = ensure_view_is_allocated(
|
grid->view = ensure_view_is_allocated(
|
||||||
term, term->search.original_view);
|
term, term->search.original_view);
|
||||||
}
|
}
|
||||||
term_damage_view(term);
|
|
||||||
search_cancel(term);
|
search_cancel(term);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue