With XInput2 it's possible that multiple pairs of keyboard and pointers
are connected. As the lock screen only grabbed keyboard and pointer using
the core protocol any additional input devices were still reporting
input events to non-lockscreen windows creating the risk of interaction
with the system and accidentially typing a password where it doesn't
belong.
This change ensures that all additional master devices are also grabbed.
Unfortunately there are no xcb bindings for xinput2 (considered
experimental and thus not build on at least all debian based distros)
and because of that the XLib library is used. This brings some problems
as we cannot process the events (for that we would need xcb bindings,
to get the events). To still be able to get any keyboard and mouse events
we grab using the core protocol as it used to be and then ignore the
"Virtual core" devices and don't grab them with XInput2. Input events
from additional devices are grabbed and ignored, but definately no longer
delivered to other windows.
BUG: 341469
FIXED-IN: 5.3.0
REVIEW: 122558
The lock screen has an authorized action "lock_screen" which is honored
for the global shortcut. The authorized action might disallow the user
to lock the screen, so this should also be honored for other ways the
user might lock the screen, e.g. through the DBus interface.
Idle timeout is not verified through the KAuthorized action as this can
be restricted seperately.
CCBUG: 174100
REVIEW: 122509
KSld connects to the DBus signals for the OnScreenDisplay and forwards
them to the greeter application through the private Wayland protocol.
The idea here is to not have the greeter connect to the DBus as in future
it would be preferable if the greeter cannot connect to DBus.
The lookandfeel package might expose an object called "onScreenDisplay".
Whenever an OSD message is recieved by the greeter it looks for such an
object and updates the osd specific properties.
The default breeze lookandfeel package integrates the OsdItem from the
same lookandfeel package.
REVIEW: 122452
This change implements support for white listed global shortcuts in
the lock screen. It interacts with KGlobalAccel to fetch shortcuts
and checks them when a key is pressed. For more detailed information
on how this functions, please see the documentation added to the new
file globalacel.h.
So far only shortcuts from kmix are white listed. This allows to
mute and change volume while the screen is locked.
CCBUG: 148228
CCBUG: 104353
FEATURE: 198097
FIXED-IN: 5.3.0
REVIEW: 122419
Start emitting notificiations again. Remove all notification events
which are no longer referenced in the code.
BUG: 276196
FIXED-IN: 5.3.0
REVIEW: 122425
some apps may still use the outdated org.freedesktop.Screensaver
inhibit interface so we still have to query the inhibition state from
PowerDevil
prevents the lock screen from appearing e.g. when playing some video
in Chrome
With IM modules it's possible that one cannot unlock the screen at
all. So better disable all IM modules in the greeter. For that we
explicitly enforce the compose module, which is the fallback in Qt.
BUG: 306932
FIXED-IN: 5.2.1
REVIEW: 122259
XFlush is not called automatically when going back to event loop, thus
events are not delivered. With the XFlushs at these two positions I'm
no longer able to reproduce the problem that the screen ends up black
instead of showing the lock windows.
When the system is going to sleep we want to ensure that the screen gets
locked before the system goes to sleep. Logind provides the inhibitor
locks which can be used for this.
If logind is available ksld gains an inhibitor lock for sleep when the
screen is unlocked. As soon as the screen gets locked the inhibitor lock
is released. In addition it connects to the prepareForSleep signal by
logind and locks the screen.
The solution needs to be extended to have a config option whether the
screen should be locked on sleep. Currently this is provided by
powerdevil. Also the solution can only work properly if power devil uses
logind's sleep dbus interface.
We only want to ensure that the greeter gets started. There is no
need to block for that. Instead we can connect to the error signal
and unlock in case the greeter failed to start.
The greeter installs a custom QQmlNetworkAccessManagerFactory which
creates QNetworkAccessManagers which do not have access to the
network.
Unfortunately this is not a 100 % secure way to disable network, any
plugin could change the factory again and thus enable network. This
is done for example by KDeclarative, so the greeter now first creates
KDeclarative and then sets the custom factory.
It is a sufficient solution to block all network access for pure
QtQuick without a binary package as we would find in a look'n'feel
package.
Network access needs to be blocked in the greeter as otherwise a
look'n'feel package were able to send the entered password (and other
information to the creator of the look'n'feel package.
REVIEW: 121847
The screenlocker_greet needs to tell the parent ksld process which
windows it created. Ksld sends input events to these windows. So
far this was based on an X property on the window. Unfortunately
ksld didn't validate whether the windows tagged with this property
belong to the screenlocker_greet process it started.
With this change the communication for announcing windows is moved
away from the X11 protocol and instead a custom Wayland protocol is
used.
Ksld starts a KWaylandServer when the greet process gets started. It
creates anonymous unix sockets for the connection and passes one
filedescriptor to the started greeter process.
The check for the X property is removed in ksld and instead only
windows ids passed through the Wayland socket connection are
accepted.
REVIEW: 121429