wlt: toolkit: dont depend on implicit buffer releases
Wayland compositors are not required to send buffer release notifications on an implicit buffer-attach. That is, an attach->commit->commit series does not cause a buffer-release notification after the second commit. Hence, send a buffer-attach on every commit that requires a new buffer-release notification. For the related wayland-protocol changes, see: http://cgit.freedesktop.org/wayland/wayland/commit/?id=7165bf21917ed1c4f5ec823a1e1642a9e83aa984 This fixes a bug where wlterm only redraws the window-content when resizing (due to explicit buffer-attach calls during redraw). Reported by: MoD Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
1 parent
4e0b9813de
commit
3d2d8f5984
1 file changed
+3
-5
+3
-5
@@ -1283,20 +1283,18 @@ static void wlt_window_do_redraw(struct wlt_window *wnd,
|
||||
}
|
||||
wnd->skip_damage = false;
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
if (!wnd->buffer_attached) {
|
||||
wnd->buffer_attached = true;
|
||||
if (wnd->resize_edges & WL_SHELL_SURFACE_RESIZE_LEFT)
|
||||
x = (int)oldw - wnd->buffer.width;
|
||||
else
|
||||
x = 0;
|
||||
if (wnd->resize_edges & WL_SHELL_SURFACE_RESIZE_TOP)
|
||||
y = (int)oldh - wnd->buffer.height;
|
||||
else
|
||||
y = 0;
|
||||
wl_surface_attach(wnd->w_surface, wnd->w_buffer, x, y);
|
||||
wnd->resize_edges = 0;
|
||||
}
|
||||
|
||||
wl_surface_attach(wnd->w_surface, wnd->w_buffer, x, y);
|
||||
wl_surface_damage(wnd->w_surface, 0, 0, wnd->buffer.width,
|
||||
wnd->buffer.height);
|
||||
wl_surface_commit(wnd->w_surface);
|
||||
|
||||
Reference in new issue
Block a user