mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
wayland: xdg_surface_configure(): call wl_surface_commit()
It seems kwin expects a wl_surface_commit() for each xdg_surface_ack_configure(). We don't want to commit before we've rendered a resized surface. So, if we *did* change the window size, let the normal rendering path do the surface commit. Only when we did *not* change the window size do we need to explicitly commit the surface in xdg_surface_configure().
This commit is contained in:
parent
595b32ddf9
commit
0126cee55d
1 changed files with 11 additions and 2 deletions
13
wayland.c
13
wayland.c
|
|
@ -513,19 +513,28 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
|
|||
uint32_t serial)
|
||||
{
|
||||
LOG_DBG("xdg-surface: configure");
|
||||
xdg_surface_ack_configure(xdg_surface, serial);
|
||||
|
||||
struct wl_window *win = data;
|
||||
struct terminal *term = win->term;
|
||||
|
||||
win->is_configured = true;
|
||||
|
||||
render_resize(term, win->configure.width, win->configure.height);
|
||||
xdg_surface_ack_configure(xdg_surface, serial);
|
||||
bool resized = render_resize(term, win->configure.width, win->configure.height);
|
||||
|
||||
if (win->configure.is_activated)
|
||||
term_visual_focus_in(term);
|
||||
else
|
||||
term_visual_focus_out(term);
|
||||
|
||||
if (!resized) {
|
||||
/*
|
||||
* kwin seems to need a commit for each configure ack, or it
|
||||
* will get stuck. Since we'll get a "real" commit soon if we
|
||||
* resized, only commit here if size did *not* change
|
||||
*/
|
||||
wl_surface_commit(win->surface);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct xdg_surface_listener xdg_surface_listener = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue