Commit Graph

11 Commits (697ea3ae0057a58f68b50bf761971a472d08289a)

Author SHA1 Message Date
Martin Gräßlin a1f21f3cea Drop not needed include to sys/sysmacros.h from logind.cpp
Fixes build on FreeBSD.
2016-06-20 11:21:45 +02:00
Martin Gräßlin 537cc148df Get the logind session to take over through env variable instead of own PID
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
2016-04-22 14:20:06 +02:00
Martin Gräßlin a21ad8d4fa 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.
2016-04-22 14:18:56 +02:00
Martin Gräßlin e435b73fed 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.
2016-04-22 14:18:56 +02:00
Andreas Sturmlechner 03f4f972d6 Fix build with future glibc (major/minor macros)
See also: https://sourceware.org/ml/libc-alpha/2015-11/msg00452.html

REVIEW: 127662
2016-04-20 19:03:34 +02:00
Martin Gräßlin 3a9adcac91 Connect to Logind's PauseDevice signal
If it emits a "pause" signal, we must acknowledge that we paused the
device.
2015-04-24 12:03:20 +02:00
Martin Gräßlin 3d5899cbfd [logind] Add support for VTNr property 2015-04-01 11:05:45 +02:00
Martin Gräßlin 26c44a6524 Add recursion check to LogindIntegration::takeControl
We never want to call takeControl twice at the same time.
2015-04-01 11:05:45 +02:00
Daniel Pastushchak 0d997b1093 Introduce categorized logging for kwin core
Done by Daniel Pastushchak for KDE during GCI-2014.
2014-12-05 14:27:15 +01:00
Martin Gräßlin 6a032e78b7 Suspend/Resume libinput when logind session Active changes
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.
2014-10-20 14:51:24 +02:00
Martin Gräßlin a918591fef Use Logind to open/close devices needed by libinput
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.
2014-10-20 14:51:24 +02:00