From 993f110d590e0d2a25fed446f75af7515a11e4b7 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 30 Jan 2024 12:29:15 +0200 Subject: [PATCH] Don't overwrite current virtual desktop when restarting Xwayland --- src/workspace.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/workspace.cpp b/src/workspace.cpp index 8621327c27..2920fd75d8 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -314,9 +314,11 @@ void Workspace::initializeX11() #ifndef QT_NO_SESSIONMANAGER sessionRestored = qApp->isSessionRestored(); #endif - if (!sessionRestored) { - m_initialDesktop = client_info.currentDesktop(); - vds->setCurrent(m_initialDesktop); + if (!waylandServer()) { + if (!sessionRestored) { + m_initialDesktop = client_info.currentDesktop(); + vds->setCurrent(m_initialDesktop); + } } // TODO: better value