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
|
|
@ -40,6 +40,7 @@ struct WlBufferTransform {
|
|||
|
||||
[[nodiscard]] int degrees() const { return 90 * (this->transform & 0b11111011); }
|
||||
[[nodiscard]] bool flip() const { return this->transform & 0b00000100; }
|
||||
[[nodiscard]] bool flipSize() const { return this->transform & 0b00000001; }
|
||||
|
||||
void apply(QMatrix4x4& matrix) const {
|
||||
matrix.rotate(this->flip() ? 180 : 0, 0, 1, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue