aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-08-08 11:04:45 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-08-08 13:32:37 +0300
commit66aae91bcab3c475a0f54076a16ebbac2d6b367a (patch)
tree8b3cd62ac451c8b7ca4cdef5a91dbe1ebadaf671 /src
parent07bd76e219a8838f04cf21ea12827363b08dff47 (diff)
downloadniri-66aae91bcab3c475a0f54076a16ebbac2d6b367a.tar.gz
niri-66aae91bcab3c475a0f54076a16ebbac2d6b367a.tar.bz2
niri-66aae91bcab3c475a0f54076a16ebbac2d6b367a.zip
screencopy: Clarify the use of integer scale
Diffstat (limited to 'src')
-rw-r--r--src/protocols/screencopy.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/protocols/screencopy.rs b/src/protocols/screencopy.rs
index 2dd9e316..5be096e5 100644
--- a/src/protocols/screencopy.rs
+++ b/src/protocols/screencopy.rs
@@ -206,6 +206,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);