summaryrefslogtreecommitdiff
path: root/plugins/unityshell
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2016-11-29 00:40:15 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2016-11-29 00:40:15 +0100
commitf647dd8de8c15ee1a136ae8c77394d056c6916d9 (patch)
tree90494a9f0b095e1a6db9be02ba30a41828c3319c /plugins/unityshell
parent4e5c5ac28f12719dfe9c9af79727a4343796ac06 (diff)
UnityScreen: toggle gestures recognition on lock
Fixes LP: #1645507 (bzr r4209.2.1)
Diffstat (limited to 'plugins/unityshell')
-rw-r--r--plugins/unityshell/src/unityshell.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index ca920df0c..c08c44f83 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -3983,6 +3983,8 @@ void UnityScreen::OnScreenLocked()
// We disable the edge barriers, to avoid blocking the mouse pointer during lockscreen
edge_barriers_->force_disable = true;
+
+ UpdateGesturesSupport();
}
void UnityScreen::OnScreenUnlocked()
@@ -3999,6 +4001,8 @@ void UnityScreen::OnScreenUnlocked()
screen->addAction(&action);
edge_barriers_->force_disable = false;
+
+ UpdateGesturesSupport();
}
void UnityScreen::SaveLockStamp(bool save)
@@ -4207,9 +4211,11 @@ lockscreen::Controller::Ptr UnityScreen::lockscreen_controller()
void UnityScreen::UpdateGesturesSupport()
{
- Settings::Instance().gestures_launcher_drag() ? gestures_sub_launcher_->Activate() : gestures_sub_launcher_->Deactivate();
- Settings::Instance().gestures_dash_tap() ? gestures_sub_dash_->Activate() : gestures_sub_dash_->Deactivate();
- Settings::Instance().gestures_windows_drag_pinch() ? gestures_sub_windows_->Activate() : gestures_sub_windows_->Deactivate();
+ auto& s = Settings::Instance();
+ bool locked = lockscreen_controller_ && lockscreen_controller_->IsLocked();
+ (!locked && s.gestures_launcher_drag()) ? gestures_sub_launcher_->Activate() : gestures_sub_launcher_->Deactivate();
+ (!locked && s.gestures_dash_tap()) ? gestures_sub_dash_->Activate() : gestures_sub_dash_->Deactivate();
+ (!locked && s.gestures_windows_drag_pinch()) ? gestures_sub_windows_->Activate() : gestures_sub_windows_->Deactivate();
}
void UnityScreen::InitGesturesSupport()