Compute correct boundaries in checkWorkspacePosition
ClosedPublic

Authored by zzag on May 3 2019, 3:33 PM.

Details

Summary

When a client sets a strut, checkWorkspacePosition will be called to
bump clients that touch corresponding screen edge.

In order to do that, checkWorkspacePosition needs to calculate client
boundaries before and after the restricted move area was changed. As it
turns out, if the client reserves space "between" screens, calculated
boundaries can be incorrect, which may lead to some funky results, e.g.
shrunken clients.

For example, let's say that there is a dual-monitor setup. If a client
reserves some amount of space at the right border of the left screen,
then clients on the right monitor will have rightMax which is equal to
the x coordinate of screenArea.

To fix that, this change ensures that only restricted areas belonging
to the same screen as the client are taken into account when computing
the boundaries.

BUG: 404837
BUG: 406573

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.May 3 2019, 3:33 PM
Restricted Application added a project: KWin. · View Herald TranscriptMay 3 2019, 3:33 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.May 3 2019, 3:33 PM
zzag edited the summary of this revision. (Show Details)May 8 2019, 9:13 AM
davidedmundson accepted this revision.May 14 2019, 11:41 AM
This revision is now accepted and ready to land.May 14 2019, 11:41 AM
This revision was automatically updated to reflect the committed changes.