mortie / swaylock-effects

Swaylock, with fancy effects
MIT License
707 stars 46 forks source link

Wrong rotation of screenshot when transform was set in sway #23

Closed dashezup closed 4 years ago

dashezup commented 4 years ago

swaylock-effects version: v1.6-1

sway config output HDMI-A-1 transform 90

Monitor (hardware, rotated)

    +------+
    |      |
    |      |
    |      |
UP  |      |  Down
    |      |
    |      |
    +------+

Screen

   UP

+------+
|      |
|      |
|      |
|      |
|      |
|      |
+------+

  DOWN

swaylock screenshot ($ swaylock -S)

     +------+
     |      |
     |      |
DOWN |      | UP
     |      |
     |      |
     |      |
     +------+

$ swaylock is fine, just the screenshot has wrong rotation.

mortie commented 4 years ago

I think this should be fixed in https://github.com/mortie/swaylock-effects/commit/f38f7e16c43febcd97d8f5a2eee089d25a8cb954; swaylock-effects now takes into account all information the compositor gives it about whether the image is vertically flipped, horizontally flipped and/or rotated, so that I can undo those transformations. It used to be that transforms were applied twice; if the screen was rotated 90 degrees, then the screenshot swaylock-effects takes would be rotated 90 degrees, then when swaylock-effects displayed that screenshot, it would get rotated another 90 degrees.

Could you test and verify that the new version works with your setup?

dashezup commented 4 years ago

@mortie Thanks, I just tried the latest commit on master branch 2cbc0c89dec71634cc13ba22c59f67955d847db4 and it shows correct rotation for me.