summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xwayland/xwayland-dmabuf.c2
-rw-r--r--hw/xwayland/xwayland-window-buffers.c15
-rw-r--r--hw/xwayland/xwayland-window-buffers.h2
-rw-r--r--hw/xwayland/xwayland-window.c6
4 files changed, 17 insertions, 8 deletions
diff --git a/hw/xwayland/xwayland-dmabuf.c b/hw/xwayland/xwayland-dmabuf.c
index db7dc44ee..e485e5b1c 100644
--- a/hw/xwayland/xwayland-dmabuf.c
+++ b/hw/xwayland/xwayland-dmabuf.c
@@ -752,7 +752,7 @@ xwl_window_dmabuf_feedback_done(void *data,
/* If the linux-dmabuf v4 per-surface feedback changed, make sure the
* window buffers get re-created with appropriate parameters.
*/
- xwl_window_buffers_dispose(xwl_window);
+ xwl_window_buffers_dispose(xwl_window, FALSE);
xwl_window_realloc_pixmap(xwl_window);
}
diff --git a/hw/xwayland/xwayland-window-buffers.c b/hw/xwayland/xwayland-window-buffers.c
index 1a7e78537..2bf6c978c 100644
--- a/hw/xwayland/xwayland-window-buffers.c
+++ b/hw/xwayland/xwayland-window-buffers.c
@@ -244,8 +244,17 @@ xwl_window_buffers_init(struct xwl_window *xwl_window)
xorg_list_init(&xwl_window->window_buffers_unavailable);
}
+static void
+xwl_window_buffer_disposal(struct xwl_window_buffer *xwl_window_buffer, Bool force)
+{
+ if (force)
+ xwl_window_buffer_dispose(xwl_window_buffer);
+ else
+ xwl_window_buffer_maybe_dispose(xwl_window_buffer);
+}
+
void
-xwl_window_buffers_dispose(struct xwl_window *xwl_window)
+xwl_window_buffers_dispose(struct xwl_window *xwl_window, Bool force)
{
struct xwl_window_buffer *xwl_window_buffer, *tmp;
@@ -257,14 +266,14 @@ xwl_window_buffers_dispose(struct xwl_window *xwl_window)
&xwl_window->window_buffers_available,
link_buffer) {
xorg_list_del(&xwl_window_buffer->link_buffer);
- xwl_window_buffer_maybe_dispose(xwl_window_buffer);
+ xwl_window_buffer_disposal(xwl_window_buffer, force);
}
xorg_list_for_each_entry_safe(xwl_window_buffer, tmp,
&xwl_window->window_buffers_unavailable,
link_buffer) {
xorg_list_del(&xwl_window_buffer->link_buffer);
- xwl_window_buffer_maybe_dispose(xwl_window_buffer);
+ xwl_window_buffer_disposal(xwl_window_buffer, force);
}
if (xwl_window->window_buffers_timer)
diff --git a/hw/xwayland/xwayland-window-buffers.h b/hw/xwayland/xwayland-window-buffers.h
index af46eb91b..dabb343c1 100644
--- a/hw/xwayland/xwayland-window-buffers.h
+++ b/hw/xwayland/xwayland-window-buffers.h
@@ -34,7 +34,7 @@
void xwl_window_buffer_add_damage_region(struct xwl_window *xwl_window);
void xwl_window_buffer_release(struct xwl_window_buffer *xwl_window_buffer);
void xwl_window_buffers_init(struct xwl_window *xwl_window);
-void xwl_window_buffers_dispose(struct xwl_window *xwl_window);
+void xwl_window_buffers_dispose(struct xwl_window *xwl_window, Bool force);
void xwl_window_realloc_pixmap(struct xwl_window *xwl_window);
PixmapPtr xwl_window_swap_pixmap(struct xwl_window *xwl_window, Bool handle_sync);
diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index b9074f313..20f4c1d04 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -1404,7 +1404,7 @@ xwl_window_update_surface_window(struct xwl_window *xwl_window)
}
if (surface_window->drawable.depth != xwl_window->surface_window->drawable.depth)
- xwl_window_buffers_dispose(xwl_window);
+ xwl_window_buffers_dispose(xwl_window, FALSE);
xwl_window->surface_window = surface_window;
register_damage(xwl_window);
@@ -1688,7 +1688,7 @@ xwl_window_dispose(struct xwl_window *xwl_window)
xorg_list_del(&xwl_window->link_damage);
xorg_list_del(&xwl_window->link_window);
- xwl_window_buffers_dispose(xwl_window);
+ xwl_window_buffers_dispose(xwl_window, FALSE);
if (xwl_window->window_buffers_timer)
TimerFree(xwl_window->window_buffers_timer);
@@ -1750,7 +1750,7 @@ xwl_window_set_window_pixmap(WindowPtr window,
old_pixmap->drawable.height == pixmap->drawable.height))
return;
- xwl_window_buffers_dispose(xwl_window);
+ xwl_window_buffers_dispose(xwl_window, FALSE);
}
Bool