Commit 8dc366d6 authored by Thomas Surrel's avatar Thomas Surrel Committed by Bhushan Shah

Do not show activity switcher during fast switches

Summary:
When using the keyboard global shortcut to switch quickly between
two activities, it does not make sense to start showing the activity
switcher, as it does not have time to show completely and just
flickers on the left side.

This patch modifies the timing when the activity switcher is shown
and when the activity is actually switched. It makes switching
quickly between two activities snappier. If the user has to search
between more activities, the bottleneck will likely not be the
small delay before showing the activity switcher.

Reviewers: #plasma, ivan

Reviewed By: #plasma, ivan

Subscribers: abetts, broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13042
parent 52cd092a
......@@ -308,7 +308,7 @@ void SwitcherBackend::switchToActivity(Direction direction)
if (activityToSet.isEmpty()) return;
QTimer::singleShot(150, this, [this,activityToSet] () {
QTimer::singleShot(0, this, [this,activityToSet] () {
setCurrentActivity(activityToSet);
});
......@@ -319,7 +319,7 @@ void SwitcherBackend::keybdSwitchedToAnotherActivity()
{
m_lastInvokedAction = dynamic_cast<QAction*>(sender());
QTimer::singleShot(0, this, &SwitcherBackend::showActivitySwitcherIfNeeded);
QTimer::singleShot(90, this, &SwitcherBackend::showActivitySwitcherIfNeeded);
}
void SwitcherBackend::showActivitySwitcherIfNeeded()
......
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