kwin/effects/presentwindows
David Edmundson e3044e619e Correctly align natural layout in present windows
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

Reviewers: #kwin, apol, broulik, zzag

Reviewed By: #kwin, apol, broulik, zzag

Subscribers: zzag, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29705
2020-05-26 10:52:16 +01:00
..
CMakeLists.txt Reduce the amount of objects that are compiled several times 2020-04-02 00:41:55 +02:00
main.qml [effects/presentwindows] Port present windows to EffectQuickView 2019-10-21 14:36:39 +01:00
presentwindows.cpp Correctly align natural layout in present windows 2020-05-26 10:52:16 +01:00
presentwindows.h [effects/presentwindows] Use windowFrameGeometryChanged 2020-02-12 10:52:26 +02:00
presentwindows.kcfg [effects] Use arg="true" in the kcfg files 2017-04-15 10:03:34 +02:00
presentwindows_config.cpp Port away from overloaded KCModule signal 2019-12-02 09:03:14 +00:00
presentwindows_config.desktop SVN_SILENT made messages (.desktop file) - always resolve ours 2020-02-11 05:59:16 +01:00
presentwindows_config.h Use nullptr everywhere 2019-09-19 17:48:21 +03:00
presentwindows_config.ui [effects/presentwindows] Allow closing windows on middle-click 2019-06-21 10:25:32 -06:00
presentwindows_proxy.cpp recreate presentwindows grids from desktopgrid 2015-09-14 21:01:01 +02:00
presentwindows_proxy.h recreate presentwindows grids from desktopgrid 2015-09-14 21:01:01 +02:00
presentwindowsconfig.kcfgc Use KConfigXT in PresentWindows Effect 2012-09-14 10:39:28 +02:00