diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-08-08 13:54:28 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-08-08 13:54:28 +0300 |
| commit | bb15d1e85027338512636195c743cb81d5801b6f (patch) | |
| tree | 90eb30a49fccf50454a7bc175dbe0c2fa5a61869 /src | |
| parent | 47680e43c5b7d71b06c0721803b3788a4b2aa44d (diff) | |
| download | niri-bb15d1e85027338512636195c743cb81d5801b6f.tar.gz niri-bb15d1e85027338512636195c743cb81d5801b6f.tar.bz2 niri-bb15d1e85027338512636195c743cb81d5801b6f.zip | |
screencopy: Change integer to fractional scale
That *was* wrong after all.
Diffstat (limited to 'src')
| -rw-r--r-- | src/protocols/screencopy.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/protocols/screencopy.rs b/src/protocols/screencopy.rs index d8b7944e..1a301e7a 100644 --- a/src/protocols/screencopy.rs +++ b/src/protocols/screencopy.rs @@ -210,10 +210,8 @@ where let rect = Rectangle::from_loc_and_size((x, y), (width, height)); - // This uses integer scale because fractional scale can only be signaled to - // surfaces, so screencopy clients can only see the integer scale for outputs. - let output_scale = output.current_scale().integer_scale(); - let physical_rect = rect.to_physical(output_scale); + let output_scale = output.current_scale().fractional_scale(); + let physical_rect = rect.to_physical_precise_round(output_scale); // Clamp captured region to the output. let Some(clamped_rect) = physical_rect.intersection(output_rect) else { |
