Jappie3 / wayfreeze

Tool to freeze the screen of a Wayland compositor
GNU Affero General Public License v3.0
25 stars 1 forks source link

Fractional scaling support #2

Closed Jappie3 closed 6 months ago

Jappie3 commented 6 months ago

uses wp_fractional_scale_v1 to scale the layer surface based on PreferredScale events received from the compositor

purrpurrn commented 6 months ago

To my testing this fixes the issue but now my main monitor doesn't freeze. This might worthy of a second #3 issue.

Jappie3 commented 6 months ago

hm so only one monitor freezes... can you influence which one by running the command on the other monitor?

also does RUST_LOG=debug wayfreeze display any errors or weird logs?

purrpurrn commented 6 months ago

After disabling 2nd monitor Wayfreeze focuses on the main monitor.

output.log (2nd monitor turned on)

output.log (2nd monitor turned off)

output.log (2nd monitor turned on after disabling)

Jappie3 commented 6 months ago

k thanks for testing... I probably won't have much time to work on this in the next 2 days, but I'll see what I can do ^^

Jappie3 commented 6 months ago

since the fractional scaling works, i'm gonna merge this & work on multi-monitor support in another branch

purrpurrn commented 5 months ago

I am sorry for nitpicking 😅. Wayfreeze has a slight blur when using fractional scaling.

Screenshots:

1. Scaling 1: w/ Wayfreeze | w/o Wayfreeze (no difference) 2. Scaling 1.2: w/ Wayfreeze | w/o Wayfreeze 3. Scaling 1.3: w/ Wayfreeze | w/o Wayfreeze 4. Scaling 1.5: w/ Wayfreeze | w/o Wayfreeze 5. Scaling 2: w/ Wayfreeze | w/o Wayfreeze (no difference)

purrpurrn commented 5 months ago

to be fair, I am not sure because this might be from grim.

Jappie3 commented 5 months ago

damn, you have a keen eye if the blur occurs when freezing the screen AND when screenshotting -> could be a wayfreeze bug if it occurs on the screenshot but not while freezing -> grim or slurp

I'll have a look at it later today

Jappie3 commented 5 months ago

took these screenshots with scale 1.5... left is with wayfreeze, right is without I honestly cannot see a difference on mine, but I can see it on your 1.5 scale screenshots

image

Jappie3 commented 5 months ago

and while the output is scaled, wayfreeze just sets the size of the output rectangle (width*scale x height*scale), the scaling of the surface itself happens by the compositor, just like any other surface... if you want you can update to master (added a bunch of logging yesterday) & post the output of RUST_LOG=trace cargo run, then I can verify if the scale is calculated correctly