https://bugs.kde.org/show_bug.cgi?id=477886

fanzhuyi...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/kwin/-/commit/c441ce5cd1
                   |                            |a691c245d0d65ae5d9df10c91d3
                   |                            |28a

--- Comment #3 from fanzhuyi...@gmail.com ---
Git commit c441ce5cd1a691c245d0d65ae5d9df10c91d328a by Yifan Zhu.
Committed on 04/12/2023 at 17:59.
Pushed by davidedmundson into branch 'master'.

Avoid accidental mixing of qreal and int

The code for placeSmart uses ints to store coordinates and dimensions,
but the various methods of QRectF return qreal types, which can be
non-integers under fractional scaling, causing multiple issues.

This commit explicitly converts the needed quantities to ints,
avoiding the issues.

Previously, the code relied on the assumption that
y = area.y() + area.height(); implies !(y < area.y() + area.height()).
This doesn't always hold when mixing qreals and ints, causing infinite loops
under fractional scaling when attempting to open large windows, as
reported in BUG 477820.

This commit also extends the fix in 5502ce9 to fractional scaling scenarios.
The ceiling of client widths and height is used, instead of the implicit
floor, which caused BUG 477886.
Related: bug 477820

M  +12   -7    src/placement.cpp

https://invent.kde.org/plasma/kwin/-/commit/c441ce5cd1a691c245d0d65ae5d9df10c91d328a

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to