aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-04-20 10:39:46 +0200
committerSimon Ser <contact@emersion.fr>2023-04-20 10:39:46 +0200
commit44069dfd5e9e3efa150ce468f48c64916f2de0ae (patch)
tree03261acc761e48a341cbb93988ef0f238f6581be /include/wlr
parentd79582434685827275d79dca05f61efed5e3d6e7 (diff)
output-layer: add cropping support
Add a src_box state field. Use the SRC_* KMS props in the DRM backend, reject the layers in the Wayland backend (for now, we can support it later via viewporter).
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_output_layer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output_layer.h b/include/wlr/types/wlr_output_layer.h
index 8bcd5a27..4e28d559 100644
--- a/include/wlr/types/wlr_output_layer.h
+++ b/include/wlr/types/wlr_output_layer.h
@@ -52,6 +52,7 @@ struct wlr_output_layer {
// private state
+ struct wlr_fbox src_box;
struct wlr_box dst_box;
};
@@ -63,6 +64,8 @@ struct wlr_output_layer_state {
// Buffer to display, or NULL to disable the layer
struct wlr_buffer *buffer;
+ // Source box, leave empty to use the whole buffer
+ struct wlr_fbox src_box;
// Destination box in output-buffer-local coordinates
struct wlr_box dst_box;