Diffusion KWin a9e469bf13f6

Properly restore current desktop from session

Authored by zzag on Mar 4 2019, 2:09 PM.

Description

Properly restore current desktop from session

Summary:
VirtualDesktopManager is initialized in two places: Workspace::init and
Workspace::initWithX11. The former method loads virtual desktops from
the config file and the latter method synchronizes VirtualDesktopManager
with RootInfo.

Both methods do

if (!VirtualDesktopManager::self()->setCurrent(m_initialDesktop))
    VirtualDesktopManager::self()->setCurrent(1);

which makes sense in Workspace::init, but not in Workspace::initWithX11.

When Workspace::initWithX11 is called, the current virtual desktop is
the same as m_initialDesktop. So that piece of code basically makes
the first virtual desktop current no matter what.

BUG: 390295
FIXED-IN: 5.15.3

Reviewers: KWin, davidedmundson

Reviewed By: KWin, davidedmundson

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D19520

Details

Committed
zzagMar 8 2019, 8:38 AM
Reviewer
KWin
Differential Revision
D19520: Properly restore current desktop from session
Parents
R108:1d59d436a51c: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown