We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a457e6 commit 8a023abCopy full SHA for 8a023ab
1 file changed
src/os/posix/x11.rs
@@ -852,14 +852,15 @@ impl Window {
852
let mut scale = 1;
853
854
loop {
855
- let w = width * (scale + 1);
856
- let h = height * (scale + 1);
+ let next_scale = scale * 2;
+ let w = width * next_scale;
857
+ let h = height * next_scale;
858
- if w >= screen_width || h >= screen_height {
859
+ if w > screen_width || h > screen_height {
860
break;
861
}
862
- scale *= 2;
863
+ scale = next_scale;
864
865
866
if scale >= 32 {
0 commit comments