Commit d234b8fd authored by Thomas Surrel's avatar Thomas Surrel Committed by Nate Graham

Activity switcher auto-hide when using Meta-Tab

Summary:
Commit 174aa217 created a new
issue where the activity switcher would not hide anymore when
switching activities with the Meta-Tab global shortcut and
releasing the keys under one second.

This patch fixes this by unconditionnal toggling the activity
switcher visibility if it should be hidden, but keeping the
timestamp condition before showing it, so that both Meta-q and
Meta-Tab behaves correctly.

BUG: 393912

Reviewers: mart, ngraham

Reviewed By: mart, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13012
parent 78cd8bb3
......@@ -73,19 +73,18 @@ Item {
property int lastToggleActivityManagerTimestamp: 0
function toggleActivityManager() {
var currentTimestamp = new Date().getTime() / 1000;
if (currentTimestamp - lastToggleActivityManagerTimestamp > 1) {
if (sidePanelStack.state == "activityManager") {
sidePanelStack.state = "closed";
} else {
var currentTimestamp = new Date().getTime() / 1000;
if (currentTimestamp - lastToggleActivityManagerTimestamp > 1) {
sidePanelStack.state = "activityManager";
sidePanelStack.setSource(Qt.resolvedUrl("../activitymanager/ActivityManager.qml"))
}
lastToggleActivityManagerTimestamp = currentTimestamp;
}
}
}
KWindowSystem {
id: kwindowsystem
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment