Fix viewport on vertically stacked monitors
ClosedPublic

Authored by davidedmundson on Oct 25 2017, 5:14 PM.

Details

Summary

We want to translate by the monitor position, so that needs to be
the negative of the position.

But Kwin/KScreen treats 0 as the top of all monitors. GL treats 0 as
bottom, so that all needs inverting.

Hence this should be a positive y value for the viewport.

BUG: 386099

Test Plan

Had two monitors
Side by side was - fine
Stacked vertically - still fine

Modded X code to extend in y instead of x.
3 monitors worked fine.

Nested wayland only seems to support one screen?

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.
davidedmundson created this revision.Oct 25 2017, 5:14 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 25 2017, 5:14 PM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
apol added a subscriber: apol.Oct 25 2017, 5:22 PM

Tested and works for me.

graesslin accepted this revision.Oct 25 2017, 6:45 PM
graesslin added a subscriber: graesslin.

Nested wayland only seems to support one screen?

There's a command line switch and it could be that only the xcb platform supports it.

We have another bug report about three screens not working if the middle one is smaller. I expect that to be fixed as well, but if you could test that would be awesome (I don't have any system with three connectors). Also two screens did not work if they have different size and are aligned on bottom. Given your description that should also be fixed, but might be worth testing as well.

Please push to 5.11 branch instead of master. Thanks for fixing, I had that on my mental note for looking into once I'm back.

Could you also adjust the virtual platform? I think it should also have the viewport adjustments.

This revision is now accepted and ready to land.Oct 25 2017, 6:45 PM
kpiwowarski added a subscriber: kpiwowarski.EditedOct 25 2017, 9:20 PM

This patch fixes my bug (mentioned above by @graesslin) https://bugs.kde.org/show_bug.cgi?id=385655

Thank you, I hope now I will be able to use Wayland session for everyday work <3

This revision was automatically updated to reflect the committed changes.

Could you also adjust the virtual platform? I think it should also have the viewport adjustments.

It doesn't (currently) use per-screen rendering so there's nothing (currently) to adjust.