Remove desktop() usage in Workspace::activateClient()

Explicitly make the last virtual desktop current. This improves code
readability and gets rid of a desktop() usage.
This commit is contained in:
Vlad Zahorodnii 2021-08-27 16:56:25 +03:00
parent d6de38c1d6
commit e5f6039a68

View file

@ -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