[x11] Add support for automatic screen rotation through XRandR
AbandonedPublic

Authored by graesslin on Nov 8 2017, 8:16 PM.

Details

Reviewers
sebas
davidedmundson
Group Reviewers
KWin
Plasma
Summary

The XRandRScreens detects whether a screen is internal and supports
transformations and thus can enable the automatic screen rotation which
is done through an XRandR request.

Diff Detail

Repository
R108 KWin
Branch
xrandr-automatic-tranformation
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin created this revision.Nov 8 2017, 8:16 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 8 2017, 8:16 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
graesslin added inline comments.Nov 8 2017, 8:17 PM
plugins/platforms/x11/standalone/screens_xrandr.cpp
315

I think something is still wrong with this request for 90/270 degrees. @sebas do you see anything being different compared to rotation in KScreen?

davidedmundson requested changes to this revision.Nov 8 2017, 10:25 PM
davidedmundson added a subscriber: davidedmundson.

I said on the previous patch that there's a *fundamental* design flaw in the previous patch, which will be even worse on X.
The last patch was pushed regardless..and now there's a patch on X without addressing the problems at all.

This revision now requires changes to proceed.Nov 8 2017, 10:25 PM

I said on the previous patch that there's a *fundamental* design flaw in the previous patch, which will be even worse on X.
The last patch was pushed regardless..and now there's a patch on X without addressing the problems at all.

Sorry, but I didn't see anything which you considered a fundamental design flaw. What should be improved in your opinion?

Please see D8738 - I hope this addresses your concerns and can us allow to unblock this change.

I hope this addresses your concerns and can us allow to unblock this change.

It could work, so I won't block it.

But I still don't understand the design rationale.

We have a component that is in charge of handling all screen management. It has all the backends already, it does the config tracking, it's got the communication all hooked up already with a simple single path in DRM.
Yet we're putting this sensor stuff in kwin instead, then having to come up with extra interfaces to fix the problems we're creating.

graesslin updated this revision to Diff 22151.Nov 10 2017, 5:12 PM
  • [libinput] Find screen for touch screen devices and calibrate accordingly
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptNov 10 2017, 5:12 PM
graesslin updated this revision to Diff 22153.Nov 10 2017, 5:14 PM

Fixup arc failure

Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptNov 10 2017, 5:14 PM

Yet we're putting this sensor stuff in kwin instead, then having to come up with extra interfaces to fix the problems we're creating.

The main reason is that I wanted to support the phone case (hwcomposer) where we don't have the OutputConfigurationInterface hooked up and where it doesn't make sense to hook it up. The second reason is that KWin needs to support the full story including input adjustments. KScreen cannot do that, KWin must do it. Given that I would consider it weird to do everything related to the rotation just except detecting the orientation change. Also I think that KWin should be able to handle the most basic screen functionality (and yes I count rotation to that nowadays) on Wayland without the help of other processes. This makes it easier to deploy KWin outside of Plasma. E.g. for things we discussed like having KWin running in SDDM as the greeter compositor it means that KWin can provide automatic rotation without having to start half of our session in the login process.

Of course that's all debatable and you might have noticed that the OrientationSensor class I added to KWin does not include anything else from KWin. It's a standalone component which can be split out and moved to KScreen.

graesslin abandoned this revision.Dec 5 2017, 4:33 PM

Discarding. There seems to not be any interest in this on X11.

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptDec 5 2017, 4:33 PM