mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
wayland: force a resize on the final configure event after an interactive resize
This is needed to apply content centering after an interactive resize, as otherwise we’d just ignore the last configure event since the only difference between that event and the next to last event is that the is-resizing bit has been cleared. I.e. the window size is identical to what we already have, and our resize code would thus ignore the event.
This commit is contained in:
parent
3948145d66
commit
773b61eb79
1 changed files with 5 additions and 2 deletions
|
|
@ -644,6 +644,8 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
|
|||
struct terminal *term = win->term;
|
||||
|
||||
bool wasnt_configured = !win->is_configured;
|
||||
bool was_resizing = win->is_resizing;
|
||||
|
||||
win->is_configured = true;
|
||||
win->is_maximized = win->configure.is_maximized;
|
||||
win->is_resizing = win->configure.is_resizing;
|
||||
|
|
@ -675,8 +677,9 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
|
|||
term->window->frame_callback = NULL;
|
||||
}
|
||||
|
||||
bool resized = render_resize(
|
||||
term, win->configure.width, win->configure.height);
|
||||
bool resized = was_resizing && !win->is_resizing
|
||||
? render_resize_force(term, win->configure.width, win->configure.height)
|
||||
: render_resize(term, win->configure.width, win->configure.height);
|
||||
|
||||
if (win->configure.is_activated)
|
||||
term_visual_focus_in(term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue