mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
wayland: configure: don't commit if we have a pending refresh
Currently, if the following occurs: 1. foot has AxB size 2. Compositor sends CxD size 3. foot detects a resize, acks and saves CxD, but doesn't redraw immediately 4. Compositor sends CxD size again (due to a toplevel state array change, for example) Then foot will detect no resize occurred, and will do an "empty" commit immediately. In this particular case that's wrong, since we're effectively acking+committing the initial AxB size. Fix by only doing the immediate commit if there's no size change **and** there's no pending refresh. Note: normally, we'd resize and refresh+commit immediately, but if we're waiting for a frame callback, then the refresh+commit will be delayed (i.e. scheduled). This is what we're checking here. Closes #2105
This commit is contained in:
parent
456ac5d79f
commit
d266599881
2 changed files with 5 additions and 1 deletions
|
|
@ -121,6 +121,10 @@
|
|||
### Fixed
|
||||
|
||||
* `REP`: wrong width of repeated multi-codepoint graphemes.
|
||||
* Incorrect surface commit after a configure event, under certain
|
||||
conditions ([#2105][2105]).
|
||||
|
||||
[2105]: https://codeberg.org/dnkl/foot/issues/2105
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
|||
|
|
@ -1134,7 +1134,7 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
|
|||
else
|
||||
term_visual_focus_out(term);
|
||||
|
||||
if (!resized) {
|
||||
if (!resized && !term->render.pending.grid) {
|
||||
/*
|
||||
* If we didn't resize, we won't be committing a new surface
|
||||
* anytime soon. Some compositors require a commit in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue