You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
4 years ago
..
backgroundcontrast Port KWin to KWaylandServer 4 years ago
blur Port KWin to KWaylandServer 4 years ago
colorpicker
coverswitch Reduce the amount of objects that are compiled several times 5 years ago
cube Reduce the amount of objects that are compiled several times 5 years ago
cubeslide Reduce the amount of objects that are compiled several times 5 years ago
desktopgrid Port KWin to KWaylandServer 4 years ago
dialogparent/package
diminactive Reduce the amount of objects that are compiled several times 5 years ago
dimscreen/package
eyeonscreen/package SVN_SILENT made messages (.desktop file) - always resolve ours 4 years ago
fade
fadedesktop
fadingpopups/package
fallapart
flipswitch Reduce the amount of objects that are compiled several times 5 years ago
frozenapp/package
glide Reduce the amount of objects that are compiled several times 5 years ago
highlightwindow
invert Reduce the amount of objects that are compiled several times 5 years ago
kscreen
login/package
logout/package
lookingglass Reduce the amount of objects that are compiled several times 5 years ago
magiclamp Reduce the amount of objects that are compiled several times 5 years ago
magnifier Reduce the amount of objects that are compiled several times 5 years ago
maximize/package
morphingpopups/package
mouseclick Reduce the amount of objects that are compiled several times 5 years ago
mousemark Reduce the amount of objects that are compiled several times 5 years ago
presentwindows Correctly align natural layout in present windows 4 years ago
resize Reduce the amount of objects that are compiled several times 5 years ago
scale/package
screenedge
screenshot Fix compile with strict iterator 4 years ago
sessionquit/package
sheet
showfps [effects/showfps] Calculate "correct" FPS 4 years ago
showpaint SVN_SILENT made messages (.desktop file) - always resolve ours 4 years ago
slide Reduce the amount of objects that are compiled several times 5 years ago
slideback
slidingpopups Port KWin to KWaylandServer 4 years ago
snaphelper
squash/package
startupfeedback Set cursor size default to 24 to align with KCM 4 years ago
thumbnailaside Reduce the amount of objects that are compiled several times 5 years ago
touchpoints
trackmouse Reduce the amount of objects that are compiled several times 5 years ago
translucency/package
windowaperture/package SVN_SILENT made messages (.desktop file) - always resolve ours 4 years ago
windowgeometry Reduce the amount of objects that are compiled several times 5 years ago
wobblywindows Reduce the amount of objects that are compiled several times 5 years ago
zoom Reduce the amount of objects that are compiled several times 5 years ago
CMakeLists.txt
Messages.sh
effect_builtins.cpp
effect_builtins.h
kwineffect.desktop
logging.cpp
shaders.qrc