Commit graph

12 commits

Author SHA1 Message Date
Martin Gräßlin
16a33f662b Improve lock screen interaction for pointer in InputRedirection
InputRedirection connects to lockStateChanged to udate the current
pointer window. This way we can ensure that the current pointer
surface gets reset as soon as the screen locks (c.f. the expect
fail in the autotest) and also that it restores to the surface under
the mouse once the screen is unlocked.

The relevant code was not yet lock screen aware and performed an
early exit. Part of the code was fine, e.g. findToplevel is lock
screen aware. So this change adjusts the methods for updating the
internal window and decoration to be lock screen aware, that is they
get reset. With that updatePointerWindow is also lock screen aware.

Thus the LockScreenFilter can also use updatePointerWindow just like
the normal handling and does not need to reimplement parts of it. As
it now relies on other code being correct it has an additional check
to verify that the current pointer surface is a surface which is allowed
to get events. If it isn't the events are not forwarded.

Reviewed-By: Bhushan Shah
2016-02-11 08:09:10 +01:00
Martin Gräßlin
09cc134bfc [autotests] Test case for lock screen intercepts key events
Our active client should lose keyboard focus when screen gets locked
and re-gain after the screen unlocks.
2016-02-08 16:52:22 +01:00
Martin Gräßlin
500bc9c18c [autotest] Add test case for global shortcuts while screen is locked
They shouldn't be triggered if the screen is locked.
2016-02-08 15:23:06 +01:00
Martin Gräßlin
037b3ba66e [autotests] Add test case for effects key handling during screen lock
Verifies that no key events are forwarded to the Effects during a
locked screen.
2016-02-08 12:36:39 +01:00
Martin Gräßlin
7558fcd4b4 [autotest] Extend LockScreen test for global pointer and axis shortcuts
The global shortcuts may not be triggered while screen is locked.
2016-02-04 09:06:15 +01:00
Martin Gräßlin
25d07c22da [autotests] Extend LockScreenTest for locking while moving window
Things which weren't possible on X11 are possible now.
2016-02-03 09:36:12 +01:00
Martin Gräßlin
a0cc3aac63 [autotest] Reduce code duplication in LockScreenTest 2016-02-02 16:18:37 +01:00
Martin Gräßlin
1baba74611 [autotests] Verify that Effects don't get pointer events on locked screen
Interesting approach I would not have expected to work. A dummy Effect
class is created in the test and an instance is passed to
EffectsHandler's startMouseInterception. It doesn't verify whether it's
an Effect it knows or has created, so it's totally happy with the dummy.

It shows that motion and press/release are passed to the Effect when
screen is not locked and doesn't while the screen is locked.
2016-02-02 14:41:28 +01:00
Martin Gräßlin
87d1f87cc0 [autotest] Extend lockscreen test
* verifies that pointer axis isn't passed to windows
* verifies that screen edge is not activated while screen is locked
2016-02-02 13:50:13 +01:00
Martin Gräßlin
b905fa0f68 [autotests] Adjust lockscreen test to improvements in KSld
On the CI system our tests failed due to the greeter failing to start
due to OpenGL problems. This was because we waited for a window to show
which never happened. Thus the test failed.

This change makes use of the new lockStateChanged signal to determine
when the screen gets locked/unlocked.

It's still possible that the test fails as I'm not able to reproduce
the failure condition on the CI system.
2016-02-02 10:22:37 +01:00
Martin Gräßlin
803d499287 [autotest] Add test case for pointer buttons on locked screen
Extends the lock screen tests by verifying that pointer button
press/release events will be intercepted by the lock screen.
2016-02-01 17:57:38 +01:00
Martin Gräßlin
7de9a402df [autotest] Add a test for locking the screen
First test case is to ensure that pointer motion events trigger a
leave event on the surface the pointer is on.

The test case shows errors in the input handling.

More tests need to be added.
2016-02-01 15:10:00 +01:00