From e5f6039a68429ffbdab525547c31ceb38d8732a4 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 27 Aug 2021 16:56:25 +0300 Subject: [PATCH] Remove desktop() usage in Workspace::activateClient() Explicitly make the last virtual desktop current. This improves code readability and gets rid of a desktop() usage. --- src/activation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activation.cpp b/src/activation.cpp index 4136714f22..a81f87d82e 100644 --- a/src/activation.cpp +++ b/src/activation.cpp @@ -289,7 +289,7 @@ void Workspace::activateClient(AbstractClient* c, bool force) raiseClient(c); if (!c->isOnCurrentDesktop()) { ++block_focus; - VirtualDesktopManager::self()->setCurrent(c->desktop()); + VirtualDesktopManager::self()->setCurrent(c->desktops().constLast()); --block_focus; } #ifdef KWIN_BUILD_ACTIVITIES