aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/libliftoff.c8
-rw-r--r--backend/wayland/output.c17
2 files changed, 16 insertions, 9 deletions
diff --git a/backend/drm/libliftoff.c b/backend/drm/libliftoff.c
index 90525d24..cd62dccb 100644
--- a/backend/drm/libliftoff.c
+++ b/backend/drm/libliftoff.c
@@ -196,10 +196,10 @@ static bool set_layer_props(struct wlr_drm_backend *drm,
return false;
}
- uint64_t crtc_x = (uint64_t)state->x;
- uint64_t crtc_y = (uint64_t)state->y;
- uint64_t crtc_w = (uint64_t)width;
- uint64_t crtc_h = (uint64_t)height;
+ uint64_t crtc_x = (uint64_t)state->dst_box.x;
+ uint64_t crtc_y = (uint64_t)state->dst_box.y;
+ uint64_t crtc_w = (uint64_t)state->dst_box.width;
+ uint64_t crtc_h = (uint64_t)state->dst_box.height;
uint64_t src_x = to_fp16(0);
uint64_t src_y = to_fp16(0);
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 38daade2..5d736a20 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -283,9 +283,15 @@ static bool output_test(struct wlr_output *wlr_output,
for (ssize_t i = state->layers_len - 1; i >= 0; i--) {
struct wlr_output_layer_state *layer_state = &state->layers[i];
if (layer_state->buffer != NULL) {
- if (layer_state->x < 0 || layer_state->y < 0 ||
- layer_state->x + layer_state->buffer->width > wlr_output->width ||
- layer_state->y + layer_state->buffer->height > wlr_output->height) {
+ int x = layer_state->dst_box.x;
+ int y = layer_state->dst_box.y;
+ int width = layer_state->dst_box.width;
+ int height = layer_state->dst_box.height;
+ if (x < 0 || y < 0 ||
+ x + width > wlr_output->width ||
+ y + height > wlr_output->height ||
+ width != layer_state->buffer->width ||
+ height != layer_state->dst_box.height) {
supported = false;
}
supported = supported &&
@@ -376,8 +382,9 @@ static void output_layer_unmap(struct wlr_wl_output_layer *layer) {
static bool output_layer_commit(struct wlr_wl_output *output,
struct wlr_wl_output_layer *layer,
const struct wlr_output_layer_state *state) {
- if (state->layer->x != state->x || state->layer->y != state->y) {
- wl_subsurface_set_position(layer->subsurface, state->x, state->y);
+ if (state->layer->dst_box.x != state->dst_box.x ||
+ state->layer->dst_box.y != state->dst_box.y) {
+ wl_subsurface_set_position(layer->subsurface, state->dst_box.x, state->dst_box.y);
}
if (state->buffer == NULL) {