Switch virtual terminal through logind instead of having a VirtualTerminal implementation
ClosedPublic

Authored by graesslin on Apr 19 2016, 8:18 AM.

Details

Summary

Get the Logind seat for our logind session
In order to switch virtual terminals through logind we need to know
the Seat object for our session.

Switch virtual teminal through logind seat

When we get the key code for virtual terminal switching we pass it
to Logind instead of going through the "legacy" ioctl interface.

Integrate libinput only through Logind instead of relying on VirtualTerminal

All the important information like whether we are on the active vt are
also provided by Logind. So instead of integrating with VirtualTerminal,
which integrates with Logind, we can just integrate with Logind directly.

[plugins/drm] Drop dependency on VirtualTerminal

Only integrates with Logind to find out when the session is active.

Fixup with input

[platforms/hwcomposer] Remove integration with VirtualTerminal

The hwcomposer plugin doesn't need it. It was only created for the
need of libinput relying on it. As libinput doesn't need it any more,
hwcomposer doesn't need to integrate with VirtualTerminal.

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.
graesslin updated this revision to Diff 3406.Apr 19 2016, 8:18 AM
graesslin retitled this revision from to Switch virtual terminal through logind instead of having a VirtualTerminal implementation.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptApr 19 2016, 8:18 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
helio accepted this revision.Apr 19 2016, 8:33 AM
helio added a reviewer: helio.
helio added a subscriber: helio.

Sounds good to me

This revision is now accepted and ready to land.Apr 19 2016, 8:33 AM
bshah accepted this revision.Apr 20 2016, 2:16 PM
bshah added a reviewer: bshah.
bshah added a subscriber: bshah.

Tested and works on mobile.

Does this mean Ctrl+Alt+Fxx won't work without systemd, i.e. I'll need to hard reset my computer when Plasma session crashes or hangs up?

Does this mean Ctrl+Alt+Fxx won't work without systemd, i.e. I'll need to hard reset my computer when Plasma session crashes or hangs up?

You don't need systemd to be your init, and kwin_wayland already requires logind for running. So this specific change makes no difference.

Does this mean Ctrl+Alt+Fxx won't work without systemd, i.e. I'll need to hard reset my computer when Plasma session crashes or hangs up?

No, that means Ctrl+Alt+Fxx won't work on Wayland(!!!!!) without the logind dbus interface. Which is no change to the status quo where one needs logind dbus interface to even reach the point that one could press ctrl+alt+Fxx.

Whether that logind dbus interface is provided by systemd-logind, logind-shim or yabadabadu is completely irrelevant. The change was motivated by the need of a system using upstart.

This revision was automatically updated to reflect the committed changes.