D19520: Properly restore current desktop from session

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION 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

REPOSITORY
  R108 KWin

BRANCH
  foo

REVISION DETAIL
  https://phabricator.kde.org/D19520

AFFECTED FILES
  workspace.cpp

To: zzag, #kwin
Cc: kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.