aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2024-01-27 11:28:37 +0300
committerSimon Ser <contact@emersion.fr>2024-01-27 12:05:05 +0000
commit0052078bd3c65c083f0768a9a02b55be77b9fd6c (patch)
treed5f5476862c4bbd5d9a14410741e9e833e5edcfd /include
parent5ae8ce807abbf6eab1113a36e190df50ffc2f9c1 (diff)
compositor: introduce wlr_surface_reject_pending()
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_compositor.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h
index da12427e..2005a949 100644
--- a/include/wlr/types/wlr_compositor.h
+++ b/include/wlr/types/wlr_compositor.h
@@ -231,6 +231,9 @@ struct wlr_surface {
bool opaque;
+ bool handling_commit;
+ bool pending_rejected;
+
int32_t preferred_buffer_scale;
bool preferred_buffer_transform_sent;
enum wl_output_transform preferred_buffer_transform;
@@ -291,6 +294,15 @@ void wlr_surface_map(struct wlr_surface *surface);
void wlr_surface_unmap(struct wlr_surface *surface);
/**
+ * Mark the pending state of a surface as rejected due to a protocol violation,
+ * preventing it from being cached or committed.
+ *
+ * This function must only be used while processing a commit request.
+ */
+void wlr_surface_reject_pending(struct wlr_surface *surface, struct wl_resource *resource,
+ uint32_t code, const char *msg, ...);
+
+/**
* Whether or not this surface currently has an attached buffer. A surface has
* an attached buffer when it commits with a non-null buffer in its pending
* state. A surface will not have a buffer if it has never committed one or has