Commit Graph

4 Commits (91a6efce337eb650c3e2ce29e7dc57a036dd3f79)

Author SHA1 Message Date
Martin Gräßlin ca50a24728 [autotests/integration] Add ScreenLockerWatcher to the Test::lockScreen and ::unlockScreen
This extends the test helper for locking the screen and unlocking the
screen to also wait for the ScreenLockerWatcher to have that state.

This is going to fail on build.kde.org as we don't have EGL there and
the greeter crashes. This needs an extension to fake that we have a
screen lock window.
2016-08-16 10:23:37 +02:00
Martin Gräßlin 697ea3ae00 Delay query whether screenlocker is registered till WaylandServer is initialized
If we try to query before WaylandServer created the KSldApp the service
owner change is never delivered. Thus a delay till we know that the
service is there on Wayland. On X11 the initialization can be done
directly.

To know when the WaylandServer is fully initialized an additional
signal is added to WaylandServer.
2016-08-16 10:17:14 +02:00
Martin Gräßlin 490eaadb83 Turn ScreenLockerWatcher into a KWIN_SINGLETON
It's created together with input, so that the input mechanismn already
has a way to check whether screen is locked.

Effects doesn't hold a member variable any more and instead uses the
singleton instance.
2016-08-15 08:37:24 +02:00
Martin Gräßlin d2a3a10802 Split ScreenLockerWatcher into dedicated source files
Being able to monitor whether the screen is locked is useful not only
to the effects system but overall in KWin. Thus to make it possible to
use it from more locations as a first step it's moved into dedicated
source files.
2016-08-15 08:16:33 +02:00