forked from quickshell/quickshell
wayland/screencopy: apply output transform to wlr screencopy
Note that this only fixes output copies, and not toplevel copies. Toplevel copies are harder because a toplevel can be on more than one output. Hopefully we'll all be using image-copy-capture before this one comes up. Fixes #75
This commit is contained in:
parent
27f97c3283
commit
d949f91347
4 changed files with 103 additions and 8 deletions
|
|
@ -120,8 +120,14 @@ void ScreencopyView::captureFrame() {
|
|||
void ScreencopyView::onFrameCaptured() {
|
||||
this->setFlag(QQuickItem::ItemHasContents);
|
||||
this->update();
|
||||
|
||||
const auto& frontbuffer = this->context->swapchain().frontbuffer();
|
||||
|
||||
auto size = frontbuffer->size();
|
||||
if (frontbuffer->transform.flipSize()) size.transpose();
|
||||
|
||||
this->bSourceSize = size;
|
||||
this->bHasContent = true;
|
||||
this->bSourceSize = this->context->swapchain().frontbuffer()->size();
|
||||
}
|
||||
|
||||
void ScreencopyView::componentComplete() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue