[wayland] Fix Placement::placeTransient keeping screens in bound.

Authored by davidedmundson on Oct 19 2018, 12:06 PM.



If a window flows off the left, we move left of the popup to the left
edge of the screen.

Currently if a window flows off the right, we move the window back by
it's own width, leaving it floating at a random point.
For consistency we should be setting it so the right edge of the popup is on the right
edge of the screen.

So in the auto test for the "right border" case:
The screen is 1280 wide, and we open a 10px popup at 1279 the final X
should be 1270.

Test Plan

Unit test

Diff Detail

R108 KWin
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: KWin. · View Herald TranscriptOct 19 2018, 12:06 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Oct 19 2018, 12:06 PM
zzag accepted this revision.EditedOct 19 2018, 1:17 PM
zzag added a subscriber: zzag.

"Fun" fact: the transient placement test has a typo testTransientPlacmenet. :-)

This revision is now accepted and ready to land.Oct 19 2018, 1:17 PM
graesslin accepted this revision.Oct 20 2018, 6:55 AM
This revision was automatically updated to reflect the committed changes.