mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
surface: fix wlr_surface_get_buffer_source_box()
This commit is contained in:
parent
664307f968
commit
72a156b18a
1 changed files with 2 additions and 9 deletions
|
@ -1473,14 +1473,7 @@ void wlr_surface_get_buffer_source_box(struct wlr_surface *surface,
|
||||||
box->y = surface->current.viewport.src.y * surface->current.scale;
|
box->y = surface->current.viewport.src.y * surface->current.scale;
|
||||||
box->width = surface->current.viewport.src.width * surface->current.scale;
|
box->width = surface->current.viewport.src.width * surface->current.scale;
|
||||||
box->height = surface->current.viewport.src.height * surface->current.scale;
|
box->height = surface->current.viewport.src.height * surface->current.scale;
|
||||||
if ((surface->current.transform & WL_OUTPUT_TRANSFORM_90) != 0) {
|
wlr_fbox_transform(box, box, surface->current.transform,
|
||||||
double tmp = box->x;
|
surface->current.buffer_width, surface->current.buffer_height);
|
||||||
box->x = box->y;
|
|
||||||
box->y = tmp;
|
|
||||||
|
|
||||||
tmp = box->width;
|
|
||||||
box->width = box->height;
|
|
||||||
box->height = tmp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue