wayland: Make workspace responsible for creating Screens

The Screens object is created by Workspace on X11. This change makes X11
and Wayland behave more similar. As is, the Screens is a helper for
window management code, don't use it in backends. Note that the X11 backend
already uses the Screens, it needs to be addressed individually.
This commit is contained in:
Vlad Zahorodnii 2022-07-12 12:23:39 +03:00
parent 137cd9c031
commit e09ca74295
5 changed files with 2 additions and 16 deletions

View file

@ -153,7 +153,6 @@ void WaylandTestApplication::performStartup()
void WaylandTestApplication::continueStartupWithScreens()
{
disconnect(kwinApp()->platform(), &Platform::screensQueried, this, &WaylandTestApplication::continueStartupWithScreens);
createScreens();
WaylandCompositor::create();
connect(Compositor::self(), &Compositor::sceneCreated, this, &WaylandTestApplication::continueStartupWithScene);
}

View file

@ -12,15 +12,14 @@
#include <config-kwin.h>
#include "atoms.h"
#include "platform.h"
#include "colormanager.h"
#include "composite.h"
#include "cursor.h"
#include "input.h"
#include "inputmethod.h"
#include "options.h"
#include "platform.h"
#include "pluginmanager.h"
#include "screens.h"
#if KWIN_BUILD_SCREENLOCKER
#include "screenlockerwatcher.h"
#endif
@ -280,15 +279,6 @@ void Application::createInput()
m_platform->createPlatformCursor(this);
}
void Application::createScreens()
{
if (Screens::self()) {
return;
}
Screens::create(this);
Q_EMIT screensCreated();
}
void Application::createAtoms()
{
atoms = new Atoms;

View file

@ -138,7 +138,6 @@ public:
}
}
void updateX11Time(xcb_generic_event_t *event);
void createScreens();
static void setCrashCount(int count);
static bool wasCrash();
@ -238,7 +237,6 @@ Q_SIGNALS:
void x11ConnectionAboutToBeDestroyed();
void xwaylandScaleChanged();
void workspaceCreated();
void screensCreated();
void platformCreated();
void virtualTerminalCreated();
void started();

View file

@ -149,7 +149,6 @@ void ApplicationWayland::performStartup()
TabletModeManager::create(this);
createPlugins();
createScreens();
WaylandCompositor::create();
connect(Compositor::self(), &Compositor::sceneCreated, platform(), &Platform::sceneInitialized);

View file

@ -157,7 +157,7 @@ Workspace::Workspace()
RuleBook::create(this)->load();
kwinApp()->createScreens();
Screens::create(this);
ScreenEdges::create(this);
// VirtualDesktopManager needs to be created prior to init shortcuts