Ensure Workspace is only started once in Wayland-only mode
The connect to Compositor::sceneCreated must be disconnected again, otherwise a restart of the Compositor results in Workspace being created again. Thanks to our autotests for finding this problem!
This commit is contained in:
parent
f0445b20e2
commit
d75e5c63d4
4 changed files with 18 additions and 12 deletions
|
@ -119,17 +119,19 @@ void WaylandTestApplication::continueStartupWithScreens()
|
|||
|
||||
if (operationMode() == OperationModeWaylandOnly) {
|
||||
createCompositor();
|
||||
connect(Compositor::self(), &Compositor::sceneCreated, this,
|
||||
[this] {
|
||||
createWorkspace();
|
||||
}
|
||||
);
|
||||
connect(Compositor::self(), &Compositor::sceneCreated, this, &WaylandTestApplication::continueStartupWithSceen);
|
||||
return;
|
||||
}
|
||||
createCompositor();
|
||||
connect(Compositor::self(), &Compositor::sceneCreated, this, &WaylandTestApplication::startXwaylandServer);
|
||||
}
|
||||
|
||||
void WaylandTestApplication::continueStartupWithSceen()
|
||||
{
|
||||
disconnect(Compositor::self(), &Compositor::sceneCreated, this, &WaylandTestApplication::continueStartupWithSceen);
|
||||
createWorkspace();
|
||||
}
|
||||
|
||||
void WaylandTestApplication::continueStartupWithX()
|
||||
{
|
||||
createX11Connection();
|
||||
|
|
|
@ -64,6 +64,7 @@ private:
|
|||
void createBackend();
|
||||
void createX11Connection();
|
||||
void continueStartupWithScreens();
|
||||
void continueStartupWithSceen();
|
||||
void continueStartupWithX();
|
||||
void startXwaylandServer();
|
||||
|
||||
|
|
|
@ -162,19 +162,21 @@ void ApplicationWayland::continueStartupWithScreens()
|
|||
|
||||
if (operationMode() == OperationModeWaylandOnly) {
|
||||
createCompositor();
|
||||
connect(Compositor::self(), &Compositor::sceneCreated, this,
|
||||
[this] {
|
||||
startSession();
|
||||
createWorkspace();
|
||||
notifyKSplash();
|
||||
}
|
||||
);
|
||||
connect(Compositor::self(), &Compositor::sceneCreated, this, &ApplicationWayland::continueStartupWithSceen);
|
||||
return;
|
||||
}
|
||||
createCompositor();
|
||||
connect(Compositor::self(), &Compositor::sceneCreated, this, &ApplicationWayland::startXwaylandServer);
|
||||
}
|
||||
|
||||
void ApplicationWayland::continueStartupWithSceen()
|
||||
{
|
||||
disconnect(Compositor::self(), &Compositor::sceneCreated, this, &ApplicationWayland::continueStartupWithSceen);
|
||||
startSession();
|
||||
createWorkspace();
|
||||
notifyKSplash();
|
||||
}
|
||||
|
||||
void ApplicationWayland::continueStartupWithX()
|
||||
{
|
||||
createX11Connection();
|
||||
|
|
|
@ -61,6 +61,7 @@ private:
|
|||
void createBackend();
|
||||
void createX11Connection();
|
||||
void continueStartupWithScreens();
|
||||
void continueStartupWithSceen();
|
||||
void continueStartupWithX();
|
||||
void startXwaylandServer();
|
||||
void startSession();
|
||||
|
|
Loading…
Reference in a new issue