D29705: Correctly align natural layout in present windows
David Edmundson
noreply at phabricator.kde.org
Wed May 13 13:20:41 BST 2020
davidedmundson created this revision.
davidedmundson added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
davidedmundson requested review of this revision.
REVISION SUMMARY
Present windows works as follows:
- It moves all windows about until nothing is overlapping with any
other window.
- This doesn't resize anything so ultimately we end up with a new
co-ordinate space that's bigger than the screen depending on the amount
of overlap.
- We then render this whole view transformed to the screen
The rectangle "bounds" is in overviewpixels, with "scale" being the
ratio to convert to screen pixels.
When adjusting the new bounds there's an attempt to centre align things.
As bounds is in "overviewpixels" we multiply references to the previous
bounds by scale, and divide everything through at the end. bounds.x/y
were missed.
This is mostly unoticable except on massive super-ultra-wide monitors
which will otherwise have a tendency to shift to the left.
TEST PLAN
Kai created a whole new test framework for this code that copy pasted
this algorithm then showed mock windows as rectangles
REPOSITORY
R108 KWin
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D29705
AFFECTED FILES
effects/presentwindows/presentwindows.cpp
To: davidedmundson, #kwin
Cc: kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200513/7ce40de7/attachment.htm>
More information about the kwin
mailing list