Although we made KWin compile with newer include requirement for major
and minor in gnu libc, we still get the warning that it's deprecated.
So let's try to turn the include order around. That should fix the
warning and hopefully still compile on non gnu libc (e.g. FreeBsd). If
it fails, we need to add a cmakedefine for the header.
Summary:
In 6ebc3d65f0 a small naming mistake led to Wayland session with
logind not working anymore. Patch to make it work again.
Also rename the variables because what they describe is a state
and not an action.
Reviewers: #kwin
Subscribers: #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6659
Summary: ConsoleKit2 as of version 1.1.1 implements the Session Controller dbus calls required by Kwin to run under Wayland. This patch first looks for the login1 service before attempting the ConsoleKit service.
Test Plan:
On a system running ConsoleKit2, logging into a text console and running:
export $(dbus-launch); export QT_QPA_PLATFORM=wayland; startplasmacompositor
Most of this patch is just shuffling code around to support both logind and CK2.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6291
Summary:
So far KWin resolved the logind session to take over by using its own
PID with the method GetSessionByPID. This doesn't work if KWin itself
is not part of the session or if KWin is supposed to take over a
different session.
The session to take over is now derived from XDG_SESSION_ID. If it is
not set the variant through getSessionByPID is used.
This allows to e.g. run kwin on vt1, but have the graphical output
on vt2. Thus it's possible to see the debug output. Also it should allow
to run kwin_wayland through an ssh session, so that gdb can be used.
If we take over another session on a different vt, we need to make sure
that it's the current virtual terminal. Otherwise assumptions in the
startup code would break. So let's ensure the session we integrate with
is active.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1445
LogindIntegration starts monitoring the Active property on the session
and emits a signal when the state changes. The LibInput::Connection
connects to this signal during the setup and uses it to suspend/resume
the libinput context.
With libinput we have the problem that we need to have privileges to
open the device files. In order to not need wrappers or suid bits, we
use logind. This means that kwin_wayland has to be the session controler.
A LogindIntegration is added to connect to logind and wrap the dbus
calls. This is based on the logind integration done for ksld in
ksmserver. The LogindIntegration is started by Workspace and the
InputRedirection tries to become the session controller and starts the
libinput integration only after this succeeded.