https://bugs.kde.org/show_bug.cgi?id=502047
--- Comment #31 from Jonas Ryssel <burner+...@knyffen.dk> --- (In reply to Noah Davis from comment #26) > The screenshot for this case actually comes directly from KWin's screenshot > plugin > without modification, so I'm not totally sure what's going on there. I think > 2560 is > likely being divided by 1.5 somewhere (1706.67) and rounded (1707), then > multiplied > by 1.5 by Spectacle (2560.5) and rounded again (2561). Unfortunately there's > not a > lot that can be done about that since screen and window sizes are defined in > logical > coordinates (physical pixel size divided by DPR) as integers. Qt's QScreen and > QWindow classes use integers for sizes and positions, but Wayland itself even > uses > integers for sizes and positions in logical coordinates. This means some > precision is > guaranteed to be lost. It doesn't seem like you can solve the issue by fixing the math, but just to prevent double work/research: I already tried reproducing the bug on various scaling factors, writing down which caused the issue, then trying to recreate the formula using all combinations of ceil, floor, round, *2, /2, /scaling_factor up to a depth of five (e.g. `floor(round((width*2)/scaling_factor)/2)`). I wasn't able to make a formula with a +1 pixel error on exactly all the monitor resolutions and scaling factors where the issue occurs. So I think the formula might be way more complicated that just rounding once or twice. (In reply to Nate Graham from comment #29) > Jonas, your issue involves overlapping screens, unlike most other people > encountering the bug. This makes it something different, which would need a > separate bug report. Just to clarify: My day-to-day monitor setup doesn't (purposefully) include overlapping monitors. I simply observed that the screenshot of my leftmost monitor was 1 pixel wider that what the resolution of the monitor supposedly was, which could potentially point at the monitors somehow accidentally overlapping by one pixel. Since most of you had issues reproducing the bug, purposefully overlapping the monitors was only to see if I could forcefully reproduce with any setup and if it would act in the same way as the bug this issue is tackling (which could also be useful for testing a fix). The fact that it does, suggests that my theory of the monitors overlapping with one pixel is correct. -- You are receiving this mail because: You are watching all bug changes.