core: Rename Platform to OutputBackend

This commit is contained in:
Vlad Zahorodnii 2022-11-05 12:43:41 +02:00
parent 72883df2aa
commit b830d408af
112 changed files with 378 additions and 379 deletions

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "wayland_server.h"
#include "window.h"
@ -49,9 +49,9 @@ void ActivationTest::initTestCase()
qRegisterMetaType<Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());
@ -521,7 +521,7 @@ void ActivationTest::stackScreensHorizontally()
1,
};
QMetaObject::invokeMethod(kwinApp()->platform(),
QMetaObject::invokeMethod(kwinApp()->outputBackend(),
"setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, screenGeometries.count()),
@ -544,7 +544,7 @@ void ActivationTest::stackScreensVertically()
1,
};
QMetaObject::invokeMethod(kwinApp()->platform(),
QMetaObject::invokeMethod(kwinApp()->outputBackend(),
"setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, screenGeometries.count()),

View file

@ -10,7 +10,7 @@
#include "activities.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "utils/xcbutils.h"
@ -49,9 +49,9 @@ void ActivitiesTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setUseKActivities(true);
kwinApp()->start();

View file

@ -11,7 +11,7 @@
#include "kwin_wayland_test.h"
#include "atoms.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "deleted.h"
#include "rules.h"
#include "virtualdesktops.h"
@ -58,7 +58,7 @@ void TestDbusInterface::initTestCase()
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->start();

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "debug_console.h"
#include "internalwindow.h"
#include "utils/xcbutils.h"
@ -50,9 +50,9 @@ void DebugConsoleTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::InternalWindow *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "internalwindow.h"
#include "pointer_input.h"
@ -121,9 +121,9 @@ void DecorationInputTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::InternalWindow *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// change some options
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "utils/xcbutils.h"
@ -44,9 +44,9 @@ void X11DesktopWindowTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -10,7 +10,7 @@
#include "composite.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "wayland_server.h"
@ -43,9 +43,9 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase()
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
config->group("org.kde.kdecoration2").writeEntry("library", "org.kde.kwin.aurorae");

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "deleted.h"
#include "effectloader.h"
#include "effects.h"
@ -45,7 +45,7 @@ void DontCrashCancelAnimationFromAnimationEndedTest::initTestCase()
{
qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::Window *>();
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->start();
QVERIFY(Compositor::self());

View file

@ -10,7 +10,7 @@
#include "composite.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "wayland_server.h"
@ -40,9 +40,9 @@ void DontCrashEmptyDecorationTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// this test needs to enforce OpenGL compositing to get into the crashy condition
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "deleted.h"
#include "wayland_server.h"
#include "window.h"
@ -34,7 +34,7 @@ void DontCrashGlxgearsTest::initTestCase()
{
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -11,7 +11,7 @@
#include "composite.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "wayland_server.h"
@ -44,9 +44,9 @@ void DontCrashNoBorder::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
config->group("org.kde.kdecoration2").writeEntry("NoPlugin", true);

View file

@ -11,7 +11,7 @@
#include "composite.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "deleted.h"
#include "effectloader.h"
@ -47,9 +47,9 @@ void DontCrashReinitializeCompositorTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup plugins(config, QStringLiteral("Plugins"));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "keyboard_input.h"
#include "pointer_input.h"
@ -47,9 +47,9 @@ void TestDontCrashUseractionsMenu::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// force style to breeze as that's the one which triggered the crash
QVERIFY(kwinApp()->setStyle(QStringLiteral("breeze")));

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "effectloader.h"
#include "effects.h"
@ -44,9 +44,9 @@ void DesktopSwitchingAnimationTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup plugins(config, QStringLiteral("Plugins"));

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "effectloader.h"
#include "effects.h"
#include "scene.h"
@ -42,9 +42,9 @@ void MaximizeAnimationTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup plugins(config, QStringLiteral("Plugins"));

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "effectloader.h"
#include "effects.h"
@ -45,9 +45,9 @@ void MinimizeAnimationTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup plugins(config, QStringLiteral("Plugins"));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "deleted.h"
#include "effectloader.h"
#include "effects.h"
@ -51,9 +51,9 @@ void PopupOpenCloseAnimationTest::initTestCase()
qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::InternalWindow *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup plugins(config, QStringLiteral("Plugins"));

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "deleted.h"
@ -130,9 +130,9 @@ void ScriptedEffectsTest::initTestCase()
qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::Effect *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
// disable all effects - we don't want to have it interact with the rendering
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -7,7 +7,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "deleted.h"
@ -52,9 +52,9 @@ void SlidingPopupsTest::initTestCase()
qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::Effect *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// disable all effects - we don't want to have it interact with the rendering
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "deleted.h"
#include "effectloader.h"
@ -47,9 +47,9 @@ void ToplevelOpenCloseAnimationTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup plugins(config, QStringLiteral("Plugins"));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "effectloader.h"
#include "effects.h"
@ -46,9 +46,9 @@ void TranslucencyTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Effect *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// disable all effects - we don't want to have it interact with the rendering
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "effectloader.h"
@ -47,9 +47,9 @@ void WobblyWindowsShadeTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Effect *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// disable all effects - we don't want to have it interact with the rendering
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -8,7 +8,7 @@
*/
#include "generic_scene_opengl_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "effectloader.h"
@ -40,9 +40,9 @@ void GenericSceneOpenGLTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// disable all effects - we don't want to have it interact with the rendering
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "input.h"
#include "internalwindow.h"
@ -60,9 +60,9 @@ void GlobalShortcutsTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::InternalWindow *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
qputenv("KWIN_XKB_DEFAULT_KEYMAP", "1");

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "virtualdesktops.h"
#include "wayland_server.h"
#include "window.h"
@ -40,9 +40,9 @@ void TestIdleInhibition::initTestCase()
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "wayland/seat_interface.h"
@ -50,9 +50,9 @@ void InputStackingOrderTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "effects.h"
@ -84,9 +84,9 @@ void InputMethodTest::initTestCase()
qRegisterMetaType<KWayland::Client::Output *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
static_cast<WaylandTestApplication *>(kwinApp())->setInputMethodServerToStart("internal");
kwinApp()->start();

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "effects.h"
@ -174,9 +174,9 @@ void InternalWindowTest::initTestCase()
qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::InternalWindow *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
kwinApp()->start();
@ -637,7 +637,7 @@ void InternalWindowTest::testPopup()
void InternalWindowTest::testScale()
{
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection,
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection,
Q_ARG(int, 2),
Q_ARG(QVector<QRect>, QVector<QRect>({QRect(0, 0, 1280, 1024), QRect(1280 / 2, 0, 1280, 1024)})),
Q_ARG(QVector<int>, QVector<int>({2, 2})));

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "keyboard_input.h"
#include "keyboard_layout.h"
#include "virtualdesktops.h"
@ -132,9 +132,9 @@ void KeyboardLayoutTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
kwinApp()->setKxkbConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "keyboard_input.h"
#include "keyboard_layout.h"
#include "virtualdesktops.h"
@ -48,7 +48,7 @@ void KeymapCreationFailureTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -10,7 +10,7 @@
#include "backends/virtual/virtual_backend.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/session.h"
#include "effects.h"
#include "inputmethod.h"
@ -71,7 +71,7 @@ WaylandTestApplication::WaylandTestApplication(OperationMode mode, int &argc, ch
addLibraryPath(ownPath);
setSession(Session::create(Session::Type::Noop));
setPlatform(std::make_unique<VirtualBackend>());
setOutputBackend(std::make_unique<VirtualBackend>());
WaylandServer::create(this);
setProcessStartupEnvironment(QProcessEnvironment::systemEnvironment());
}
@ -131,7 +131,7 @@ void WaylandTestApplication::performStartup()
// first load options - done internally by a different thread
createOptions();
if (!platform()->initialize()) {
if (!outputBackend()->initialize()) {
std::exit(1);
}

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "input.h"
#include "scripting/scripting.h"
@ -46,7 +46,7 @@ void KWinBindingsTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -7,7 +7,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "main.h"
#include "wayland_server.h"
#include "window.h"
@ -54,9 +54,9 @@ private Q_SLOTS:
void LayerShellV1WindowTest::initTestCase()
{
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -10,7 +10,7 @@
#include "composite.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/renderbackend.h"
#include "cursor.h"
#include "screenedge.h"
@ -178,9 +178,9 @@ void LockScreenTest::initTestCase()
qRegisterMetaType<KWin::ElectricBorder>("ElectricBorder");
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2"));
kwinApp()->start();

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "decorations/decorationbridge.h"
#include "decorations/settings.h"
@ -48,9 +48,9 @@ void TestMaximized::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "input.h"
#include "keyboard_input.h"
@ -82,7 +82,7 @@ void Target::shortcut()
void ModifierOnlyShortcutTest::initTestCase()
{
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -11,7 +11,7 @@
#include "atoms.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "effects.h"
@ -82,9 +82,9 @@ void MoveResizeWindowTest::initTestCase()
qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());
const auto outputs = workspace()->outputs();

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "plugins/nightcolor/constants.h"
#include "plugins/nightcolor/nightcolormanager.h"
#include "wayland_server.h"
@ -34,9 +34,9 @@ private Q_SLOTS:
void NightColorTest::initTestCase()
{
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "input.h"
#include "keyboard_input.h"
@ -90,7 +90,7 @@ void NoGlobalShortcutsTest::initTestCase()
{
qRegisterMetaType<KWin::ElectricBorder>("ElectricBorder");
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName, KWin::WaylandServer::InitializationFlag::NoGlobalShortcuts));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -7,8 +7,8 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/outputbackend.h"
#include "core/outputconfiguration.h"
#include "core/platform.h"
#include "cursor.h"
#include "wayland_server.h"
#include "window.h"
@ -50,9 +50,9 @@ void OutputChangesTest::initTestCase()
qRegisterMetaType<Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());
@ -64,7 +64,7 @@ void OutputChangesTest::initTestCase()
void OutputChangesTest::init()
{
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QVERIFY(Test::setupWaylandConnection());
workspace()->setActiveOutput(QPoint(640, 512));
@ -78,7 +78,7 @@ void OutputChangesTest::cleanup()
void OutputChangesTest::testWindowSticksToOutputAfterOutputIsDisabled()
{
auto outputs = kwinApp()->platform()->outputs();
auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -104,7 +104,7 @@ void OutputChangesTest::testWindowSticksToOutputAfterOutputIsDisabled()
void OutputChangesTest::testWindowSticksToOutputAfterAnotherOutputIsDisabled()
{
auto outputs = kwinApp()->platform()->outputs();
auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -134,7 +134,7 @@ void OutputChangesTest::testWindowSticksToOutputAfterAnotherOutputIsDisabled()
void OutputChangesTest::testWindowSticksToOutputAfterOutputIsMoved()
{
auto outputs = kwinApp()->platform()->outputs();
auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -163,7 +163,7 @@ void OutputChangesTest::testWindowSticksToOutputAfterOutputsAreSwappedLeftToRigh
// This test verifies that a window placed on the left monitor sticks
// to that monitor even after the monitors are swapped horizontally.
const auto outputs = kwinApp()->platform()->outputs();
const auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -196,7 +196,7 @@ void OutputChangesTest::testWindowSticksToOutputAfterOutputsAreSwappedRightToLef
// This test verifies that a window placed on the right monitor sticks
// to that monitor even after the monitors are swapped horizontally.
const auto outputs = kwinApp()->platform()->outputs();
const auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -228,7 +228,7 @@ void OutputChangesTest::testWindowRestoredAfterEnablingOutput()
{
// This test verifies that a window will be moved back to its original output when it's hotplugged.
const auto outputs = kwinApp()->platform()->outputs();
const auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -271,7 +271,7 @@ void OutputChangesTest::testWindowNotRestoredAfterMovingWindowAndEnablingOutput(
// This test verifies that a window won't be moved to its original output when it's
// hotplugged because the window was moved manually by the user.
const auto outputs = kwinApp()->platform()->outputs();
const auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -321,7 +321,7 @@ void OutputChangesTest::testMaximizedWindowRestoredAfterEnablingOutput()
// This test verifies that a maximized window will be moved to its original
// output when it's re-enabled.
const auto outputs = kwinApp()->platform()->outputs();
const auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -388,7 +388,7 @@ void OutputChangesTest::testFullScreenWindowRestoredAfterEnablingOutput()
// This test verifies that a fullscreen window will be moved to its original
// output when it's re-enabled.
const auto outputs = kwinApp()->platform()->outputs();
const auto outputs = kwinApp()->outputBackend()->outputs();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -454,7 +454,7 @@ void OutputChangesTest::testWindowRestoredAfterChangingScale()
{
// This test verifies that a window will be moved to its original position after changing the scale of an output
const auto output = kwinApp()->platform()->outputs().front();
const auto output = kwinApp()->outputBackend()->outputs().front();
// Create a window.
std::unique_ptr<KWayland::Client::Surface> surface(Test::createSurface());
@ -498,7 +498,7 @@ void OutputChangesTest::testMaximizeStateRestoredAfterEnablingOutput()
// This test verifies that the window state will get restored after disabling and enabling an output,
// even if its maximize state changed in the process
const auto outputs = kwinApp()->platform()->outputs();
const auto outputs = kwinApp()->outputBackend()->outputs();
// Disable the right output
{

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "placement.h"
#include "wayland_server.h"
@ -79,9 +79,9 @@ void TestPlacement::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "virtualdesktops.h"
#include "wayland_server.h"
@ -60,9 +60,9 @@ void PlasmaSurfaceTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());
@ -195,7 +195,7 @@ void PlasmaSurfaceTest::testOSDPlacement()
// change the screen size
const QVector<QRect> geometries{QRect(0, 0, 1280, 1024), QRect(1280, 0, 1280, 1024)};
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, 2),
Q_ARG(QVector<QRect>, geometries));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "wayland/seat_interface.h"
#include "wayland_server.h"
@ -58,9 +58,9 @@ void PlasmaWindowTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "wayland_server.h"
@ -28,9 +28,9 @@ private Q_SLOTS:
void PlatformCursorTest::initTestCase()
{
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "keyboard_input.h"
#include "pointer_input.h"
@ -58,9 +58,9 @@ void TestPointerConstraints::initTestCase()
qRegisterMetaType<PointerFunc>();
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// set custom config which disables the OnScreenNotification
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "effects.h"
@ -134,9 +134,9 @@ void PointerInputTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
@ -376,7 +376,7 @@ void PointerInputTest::testUpdateFocusAfterScreenChange()
QVERIFY(leftSpy.wait());
// now let's remove the screen containing the cursor
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, 1),
Q_ARG(QVector<QRect>, QVector<QRect>{QRect(0, 0, 1280, 1024)}));
@ -590,7 +590,7 @@ void PointerInputTest::testModifierClickUnrestrictedFullscreenMove()
{
// this test ensures that Meta+mouse button press triggers unrestricted move for fullscreen windows
if (workspace()->outputs().size() < 2) {
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
}
// first modify the config for this run
@ -1564,7 +1564,7 @@ void PointerInputTest::testConfineToScreenGeometry()
QRect(1280, 0, 1280, 1024),
QRect(2560, 0, 1280, 1024),
QRect(1280, 1024, 1280, 1024)};
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, geometries.count()),
Q_ARG(QVector<QRect>, geometries));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "decorations/decorationbridge.h"
#include "decorations/settings.h"
@ -83,9 +83,9 @@ void QuickTilingTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// set custom config which disables the Outline
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "wayland_server.h"
#include "workspace.h"
@ -36,9 +36,9 @@ private Q_SLOTS:
void ScreenChangesTest::initTestCase()
{
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());
@ -83,7 +83,7 @@ void ScreenChangesTest::testScreenAddRemove()
// let's announce a new output
const QVector<QRect> geometries{QRect(0, 0, 1280, 1024), QRect(1280, 0, 1280, 1024)};
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, 2),
Q_ARG(QVector<QRect>, geometries));
@ -115,14 +115,14 @@ void ScreenChangesTest::testScreenAddRemove()
QVERIFY(o1->isValid());
QSignalSpy o1ChangedSpy(o1.get(), &KWayland::Client::Output::changed);
QVERIFY(o1ChangedSpy.wait());
KWin::Output *serverOutput1 = kwinApp()->platform()->findOutput(o1->name()); // use wl_output.name to find the compositor side output
KWin::Output *serverOutput1 = kwinApp()->outputBackend()->findOutput(o1->name()); // use wl_output.name to find the compositor side output
QCOMPARE(o1->globalPosition(), serverOutput1->geometry().topLeft());
QCOMPARE(o1->pixelSize(), serverOutput1->modeSize());
std::unique_ptr<KWayland::Client::Output> o2(registry.createOutput(outputAnnouncedSpy.last().first().value<quint32>(), outputAnnouncedSpy.last().last().value<quint32>()));
QVERIFY(o2->isValid());
QSignalSpy o2ChangedSpy(o2.get(), &KWayland::Client::Output::changed);
QVERIFY(o2ChangedSpy.wait());
KWin::Output *serverOutput2 = kwinApp()->platform()->findOutput(o2->name()); // use wl_output.name to find the compositor side output
KWin::Output *serverOutput2 = kwinApp()->outputBackend()->findOutput(o2->name()); // use wl_output.name to find the compositor side output
QCOMPARE(o2->globalPosition(), serverOutput2->geometry().topLeft());
QCOMPARE(o2->pixelSize(), serverOutput2->modeSize());
@ -150,7 +150,7 @@ void ScreenChangesTest::testScreenAddRemove()
QSignalSpy o2RemovedSpy(o2.get(), &KWayland::Client::Output::removed);
const QVector<QRect> geometries2{QRect(0, 0, 1280, 1024)};
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, 1),
Q_ARG(QVector<QRect>, geometries2));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "screenedge.h"
@ -43,9 +43,9 @@ void ScreenEdgeClientShowTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// set custom config which disable touch edge
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "effectloader.h"
#include "main.h"
@ -70,9 +70,9 @@ void ScreenEdgesTest::initTestCase()
qRegisterMetaType<KWin::ElectricBorder>("ElectricBorder");
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
// Disable effects, in particular present windows, which reserves a screen edge.
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "wayland_server.h"
#include "window.h"
@ -43,9 +43,9 @@ void ScreensTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
@ -85,7 +85,7 @@ void ScreensTest::cleanup()
workspace()->slotReconfigure();
// Reset the screen layout of the test environment.
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
}
void ScreensTest::testCurrent_data()
@ -132,7 +132,7 @@ void ScreensTest::testCurrentWithFollowsMouse()
workspace()->slotReconfigure();
QFETCH(QVector<QRect>, geometries);
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection,
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection,
Q_ARG(int, geometries.count()), Q_ARG(QVector<QRect>, geometries));
QFETCH(QPoint, cursorPos);
@ -158,7 +158,7 @@ void ScreensTest::testCurrentPoint_data()
void ScreensTest::testCurrentPoint()
{
QFETCH(QVector<QRect>, geometries);
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection,
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection,
Q_ARG(int, geometries.count()), Q_ARG(QVector<QRect>, geometries));
// Disable "active screen follows mouse"

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "scripting/scripting.h"
#include "wayland_server.h"
#include "window.h"
@ -46,9 +46,9 @@ void MinimizeAllScriptTest::initTestCase()
qRegisterMetaType<Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "effectloader.h"
#include "scripting/scripting.h"
@ -49,9 +49,9 @@ private:
void ScreenEdgeTest::initTestCase()
{
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 1));
// empty config to have defaults
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "wayland_server.h"
#include "workspace.h"
@ -39,9 +39,9 @@ void ShadeTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "wayland_server.h"
#include "window.h"
#include "workspace.h"
@ -36,7 +36,7 @@ void ShowingDesktopTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->start();

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "atoms.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "deleted.h"
#include "main.h"
#include "wayland_server.h"
@ -56,7 +56,7 @@ void StackingOrderTest::initTestCase()
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "screenedge.h"
@ -62,9 +62,9 @@ void StrutsTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
// set custom config which disables the Outline
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
@ -678,7 +678,7 @@ void StrutsTest::test363804()
// this test verifies the condition described in BUG 363804
// two screens in a vertical setup, aligned to right border with panel on the bottom screen
const QVector<QRect> geometries{QRect(0, 0, 1920, 1080), QRect(554, 1080, 1366, 768)};
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, 2),
Q_ARG(QVector<QRect>, geometries));
@ -760,7 +760,7 @@ void StrutsTest::testLeftScreenSmallerBottomAligned()
// what this test in addition tests is whether a window larger than the left screen is not placed into
// the dead area
const QVector<QRect> geometries{QRect(0, 282, 1366, 768), QRect(1366, 0, 1680, 1050)};
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, 2),
Q_ARG(QVector<QRect>, geometries));
@ -874,7 +874,7 @@ void StrutsTest::testWindowMoveWithPanelBetweenScreens()
// left screen must be smaller than right screen
const QVector<QRect> geometries{QRect(0, 282, 1366, 768), QRect(1366, 0, 1680, 1050)};
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs",
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs",
Qt::DirectConnection,
Q_ARG(int, 2),
Q_ARG(QVector<QRect>, geometries));

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "input.h"
#include "tabbox/tabbox.h"
@ -42,9 +42,9 @@ void TabBoxTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
KSharedConfigPtr c = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
c->group("TabBox").writeEntry("ShowTabBox", false);

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "main.h"
#include "virtualkeyboard_dbus.h"
#include "wayland_server.h"
@ -44,9 +44,9 @@ void VirtualKeyboardDBusTest::initTestCase()
{
QDBusConnection::sessionBus().registerService(QStringLiteral("org.kde.kwin.testvirtualkeyboard"));
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
static_cast<WaylandTestApplication *>(kwinApp())->setInputMethodServerToStart("internal");
kwinApp()->start();

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "touch_input.h"
#include "wayland_server.h"
@ -54,9 +54,9 @@ void TouchInputTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "wayland/seat_interface.h"
#include "wayland/surface_interface.h"
@ -62,9 +62,9 @@ void TransientPlacementTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -8,7 +8,7 @@
*/
#include "kwin_wayland_test.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "main.h"
#include "virtualdesktops.h"
#include "wayland_server.h"
@ -39,7 +39,7 @@ void VirtualDesktopTest::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -10,7 +10,7 @@
#include "atoms.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "rules.h"
@ -43,9 +43,9 @@ void WindowRuleTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "keyboard_input.h"
#include "pointer_input.h"
@ -54,9 +54,9 @@ void TestWindowSelection::initTestCase()
{
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
qputenv("XKB_DEFAULT_RULES", "evdev");
kwinApp()->start();

View file

@ -10,7 +10,7 @@
#include "atoms.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "effectloader.h"
@ -65,7 +65,7 @@ void X11WindowTest::initTestCase()
qRegisterMetaType<KWin::Deleted *>();
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));

View file

@ -12,8 +12,8 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/outputbackend.h"
#include "core/outputconfiguration.h"
#include "core/platform.h"
#include "cursor.h"
#include "rules.h"
#include "virtualdesktops.h"
@ -178,9 +178,9 @@ void TestXdgShellWindowRules::initTestCase()
qRegisterMetaType<KWin::Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "decorations/decorationbridge.h"
#include "decorations/settings.h"
@ -166,9 +166,9 @@ void TestXdgShellWindow::initTestCase()
qRegisterMetaType<KWayland::Client::Output *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -9,7 +9,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "deleted.h"
#include "wayland/seat_interface.h"
@ -42,9 +42,9 @@ void XWaylandInputTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<KWin::Deleted *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -10,7 +10,7 @@
#include "kwin_wayland_test.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "wayland/seat_interface.h"
#include "wayland_server.h"
#include "window.h"
@ -50,11 +50,11 @@ void XwaylandSelectionsTest::initTestCase()
qRegisterMetaType<KWin::Window *>();
qRegisterMetaType<QProcess::ExitStatus>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
// QSignalSpy clipboardSyncDevicedCreated{waylandServer(), &WaylandServer::xclipboardSyncDataDeviceCreated};
// QVERIFY(clipboardSyncDevicedCreated.isValid());
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
kwinApp()->start();
QVERIFY(applicationStartedSpy.wait());

View file

@ -8,7 +8,7 @@
#include "composite.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "main.h"
#include "scene.h"
#include "unmanaged.h"
@ -47,9 +47,9 @@ void XwaylandServerCrashTest::initTestCase()
qRegisterMetaType<Unmanaged *>();
qRegisterMetaType<X11Window *>();
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup xwaylandGroup = config->group("Xwayland");

View file

@ -7,7 +7,7 @@
#include "kwin_wayland_test.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "main.h"
#include "scene.h"
#include "wayland_server.h"
@ -43,9 +43,9 @@ private Q_SLOTS:
void XwaylandServerRestartTest::initTestCase()
{
QSignalSpy applicationStartedSpy(kwinApp(), &Application::started);
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
kwinApp()->outputBackend()->setInitialWindowSize(QSize(1280, 1024));
QVERIFY(waylandServer()->init(s_socketName));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QMetaObject::invokeMethod(kwinApp()->outputBackend(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup xwaylandGroup = config->group("Xwayland");

View file

@ -42,10 +42,10 @@ target_sources(kwin PRIVATE
core/inputbackend.cpp
core/inputdevice.cpp
core/output.cpp
core/outputbackend.cpp
core/outputconfiguration.cpp
core/outputlayer.cpp
core/overlaywindow.cpp
core/platform.cpp
core/renderbackend.cpp
core/renderjournal.cpp
core/renderlayer.cpp

View file

@ -70,7 +70,7 @@ static QStringList splitPathList(const QString &input, const QChar delimiter)
}
DrmBackend::DrmBackend(Session *session, QObject *parent)
: Platform(parent)
: OutputBackend(parent)
, m_udev(std::make_unique<Udev>())
, m_udevMonitor(m_udev->monitor())
, m_session(session)

View file

@ -7,7 +7,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "core/platform.h"
#include "core/outputbackend.h"
#include "dpmsinputeventfilter.h"
@ -34,7 +34,7 @@ class DrmGpu;
class DrmVirtualOutput;
class DrmRenderBackend;
class KWIN_EXPORT DrmBackend : public Platform
class KWIN_EXPORT DrmBackend : public OutputBackend
{
Q_OBJECT

View file

@ -14,7 +14,7 @@
// TODO: Make it compile also in testing environment
#ifndef KWIN_BUILD_TESTING
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "main.h"
#include "window.h"
#include "workspace.h"
@ -136,7 +136,7 @@ void Connection::doSetup()
deactivate();
}
});
connect(kwinApp()->platform(), &Platform::outputsQueried, this, &Connection::updateScreens);
connect(kwinApp()->outputBackend(), &OutputBackend::outputsQueried, this, &Connection::updateScreens);
handleEvent();
}
@ -564,7 +564,7 @@ void Connection::applyScreenToDevice(Device *device)
}
Output *deviceOutput = nullptr;
const QVector<Output *> outputs = kwinApp()->platform()->outputs();
const QVector<Output *> outputs = kwinApp()->outputBackend()->outputs();
// let's try to find a screen for it
if (!device->outputName().isEmpty()) {

View file

@ -11,7 +11,7 @@
#include <config-kwin.h>
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "libinput_logging.h"
#include "main.h"
#include "mousebuttons.h"
@ -633,7 +633,7 @@ void Device::setOutputName(const QString &name)
}
setOutput(nullptr);
auto outputs = kwinApp()->platform()->outputs();
auto outputs = kwinApp()->outputBackend()->outputs();
for (int i = 0; i < outputs.count(); ++i) {
if (!outputs[i]->isEnabled()) {
continue;

View file

@ -18,7 +18,7 @@ namespace KWin
{
VirtualBackend::VirtualBackend(QObject *parent)
: Platform(parent)
: OutputBackend(parent)
{
if (qEnvironmentVariableIsSet("KWIN_WAYLAND_VIRTUAL_SCREENSHOTS")) {
m_screenshotDir.reset(new QTemporaryDir);

View file

@ -8,7 +8,7 @@
*/
#pragma once
#include "core/platform.h"
#include "core/outputbackend.h"
#include <kwin_export.h>
@ -22,7 +22,7 @@ namespace KWin
class VirtualBackend;
class VirtualOutput;
class KWIN_EXPORT VirtualBackend : public Platform
class KWIN_EXPORT VirtualBackend : public OutputBackend
{
Q_OBJECT

View file

@ -541,7 +541,7 @@ void WaylandSeat::destroyTouchDevice()
}
WaylandBackend::WaylandBackend(QObject *parent)
: Platform(parent)
: OutputBackend(parent)
, m_display(nullptr)
, m_eventQueue(std::make_unique<EventQueue>())
, m_registry(std::make_unique<Registry>())

View file

@ -13,7 +13,7 @@
// KWin
#include "core/inputbackend.h"
#include "core/inputdevice.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "utils/filedescriptor.h"
#include <kwinglobals.h>
// Qt
@ -242,7 +242,7 @@ private:
* It creates the connection to the Wayland Compositor, sets up the registry and creates
* the Wayland output surfaces and its shell mappings.
*/
class KWIN_EXPORT WaylandBackend : public Platform
class KWIN_EXPORT WaylandBackend : public OutputBackend
{
Q_OBJECT

View file

@ -10,7 +10,7 @@
// kwineffects
#include <kwinglutils.h>
// kwin
#include "core/platform.h"
#include "core/outputbackend.h"
#include "main.h"
#include "utils/common.h"
#include "utils/xcbutils.h"
@ -90,7 +90,7 @@ void EglOnXBackend::init()
bool EglOnXBackend::initRenderingContext()
{
initClientExtensions();
EGLDisplay dpy = kwinApp()->platform()->sceneEglDisplay();
EGLDisplay dpy = kwinApp()->outputBackend()->sceneEglDisplay();
// Use eglGetPlatformDisplayEXT() to get the display pointer
// if the implementation supports it.

View file

@ -44,7 +44,7 @@ EffectsHandlerImplX11::~EffectsHandlerImplX11()
bool EffectsHandlerImplX11::doGrabKeyboard()
{
auto keyboard = static_cast<X11StandalonePlatform *>(kwinApp()->platform())->keyboard();
auto keyboard = static_cast<X11StandalonePlatform *>(kwinApp()->outputBackend())->keyboard();
if (!keyboard->xkbKeymap()) {
return false;
}

View file

@ -6,8 +6,8 @@
*/
#include "x11_standalone_egl_backend.h"
#include "core/outputbackend.h"
#include "core/overlaywindow.h"
#include "core/platform.h"
#include "core/renderloop_p.h"
#include "kwinglplatform.h"
#include "options.h"
@ -119,8 +119,8 @@ void EglBackend::init()
m_fbo = std::make_unique<GLFramebuffer>(0, workspace()->geometry().size());
kwinApp()->platform()->setSceneEglDisplay(shareDisplay);
kwinApp()->platform()->setSceneEglGlobalShareContext(shareContext);
kwinApp()->outputBackend()->setSceneEglDisplay(shareDisplay);
kwinApp()->outputBackend()->setSceneEglGlobalShareContext(shareContext);
EglOnXBackend::init();
}

View file

@ -24,8 +24,8 @@
#include "x11_standalone_sgivideosyncvsyncmonitor.h"
// kwin
#include "composite.h"
#include "core/outputbackend.h"
#include "core/overlaywindow.h"
#include "core/platform.h"
#include "core/renderloop_p.h"
#include "options.h"
#include "scene.h"
@ -98,7 +98,7 @@ bool SwapEventFilter::event(xcb_generic_event_t *event)
// it's CLOCK_MONOTONIC, so no special conversions are needed.
const std::chrono::microseconds timestamp((uint64_t(swapEvent->ust_hi) << 32) | swapEvent->ust_lo);
const auto platform = static_cast<X11StandalonePlatform *>(kwinApp()->platform());
const auto platform = static_cast<X11StandalonePlatform *>(kwinApp()->outputBackend());
RenderLoopPrivate::get(platform->renderLoop())->notifyFrameCompleted(timestamp);
return true;

View file

@ -100,7 +100,7 @@ bool XrandrEventFilter::event(xcb_generic_event_t *event)
}
X11StandalonePlatform::X11StandalonePlatform(QObject *parent)
: Platform(parent)
: OutputBackend(parent)
, m_updateOutputsTimer(std::make_unique<QTimer>())
, m_x11Display(QX11Info::display())
, m_renderLoop(std::make_unique<RenderLoop>())
@ -474,7 +474,7 @@ static int currentRefreshRate()
return refreshRate;
}
const QVector<Output *> outputs = kwinApp()->platform()->outputs();
const QVector<Output *> outputs = kwinApp()->outputBackend()->outputs();
if (outputs.isEmpty()) {
return 60000;
}

View file

@ -8,7 +8,7 @@
*/
#ifndef KWIN_X11_PLATFORM_H
#define KWIN_X11_PLATFORM_H
#include "core/platform.h"
#include "core/outputbackend.h"
#include <kwin_export.h>
@ -35,7 +35,7 @@ class Compositor;
class Scene;
class Window;
class KWIN_EXPORT X11StandalonePlatform : public Platform
class KWIN_EXPORT X11StandalonePlatform : public OutputBackend
{
Q_OBJECT

View file

@ -7,7 +7,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "x11_standalone_xinputintegration.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "gestures.h"
#include "keyboard_input.h"
#include "main.h"

View file

@ -10,7 +10,7 @@
#include "core/inputbackend.h"
#include "core/inputdevice.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include <kwin_export.h>
@ -81,7 +81,7 @@ private:
X11WindowedBackend *m_backend;
};
class KWIN_EXPORT X11WindowedBackend : public Platform
class KWIN_EXPORT X11WindowedBackend : public OutputBackend
{
Q_OBJECT

View file

@ -11,9 +11,9 @@
#include <config-kwin.h>
#include "core/output.h"
#include "core/outputbackend.h"
#include "core/outputlayer.h"
#include "core/overlaywindow.h"
#include "core/platform.h"
#include "core/renderlayer.h"
#include "core/renderloop.h"
#include "cursordelegate_opengl.h"
@ -141,11 +141,11 @@ Compositor::Compositor(QObject *workspace)
// The ctor of this class is invoked from the Workspace ctor, that means before
// Workspace is completely constructed, so calling Workspace::self() would result
// in undefined behavior. This is fixed by using a delayed invocation.
if (kwinApp()->platform()->isReady()) {
if (kwinApp()->outputBackend()->isReady()) {
QTimer::singleShot(0, this, &Compositor::start);
}
connect(
kwinApp()->platform(), &Platform::readyChanged, this, [this](bool ready) {
kwinApp()->outputBackend(), &OutputBackend::readyChanged, this, [this](bool ready) {
if (ready) {
start();
} else {
@ -182,7 +182,7 @@ bool Compositor::attemptOpenGLCompositing()
createOpenGLSafePoint(OpenGLSafePoint::PostInit);
});
std::unique_ptr<OpenGLBackend> backend = kwinApp()->platform()->createOpenGLBackend();
std::unique_ptr<OpenGLBackend> backend = kwinApp()->outputBackend()->createOpenGLBackend();
if (!backend) {
return false;
}
@ -212,7 +212,7 @@ bool Compositor::attemptOpenGLCompositing()
bool Compositor::attemptQPainterCompositing()
{
std::unique_ptr<QPainterBackend> backend(kwinApp()->platform()->createQPainterBackend());
std::unique_ptr<QPainterBackend> backend(kwinApp()->outputBackend()->createQPainterBackend());
if (!backend || backend->isFailed()) {
return false;
}
@ -255,7 +255,7 @@ bool Compositor::setupStart()
Q_EMIT aboutToToggleCompositing();
const QVector<CompositingType> availableCompositors = kwinApp()->platform()->supportedCompositors();
const QVector<CompositingType> availableCompositors = kwinApp()->outputBackend()->supportedCompositors();
QVector<CompositingType> candidateCompositors;
// If compositing has been restarted, try to use the last used compositing type.

View file

@ -7,7 +7,7 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "platform.h"
#include "outputbackend.h"
#include "dmabuftexture.h"
#include "inputbackend.h"
@ -19,47 +19,47 @@
namespace KWin
{
Platform::Platform(QObject *parent)
OutputBackend::OutputBackend(QObject *parent)
: QObject(parent)
, m_eglDisplay(EGL_NO_DISPLAY)
{
}
Platform::~Platform()
OutputBackend::~OutputBackend()
{
}
std::unique_ptr<InputBackend> Platform::createInputBackend()
std::unique_ptr<InputBackend> OutputBackend::createInputBackend()
{
return nullptr;
}
std::unique_ptr<OpenGLBackend> Platform::createOpenGLBackend()
std::unique_ptr<OpenGLBackend> OutputBackend::createOpenGLBackend()
{
return nullptr;
}
std::unique_ptr<QPainterBackend> Platform::createQPainterBackend()
std::unique_ptr<QPainterBackend> OutputBackend::createQPainterBackend()
{
return nullptr;
}
std::optional<DmaBufParams> Platform::testCreateDmaBuf(const QSize &size, quint32 format, const QVector<uint64_t> &modifiers)
std::optional<DmaBufParams> OutputBackend::testCreateDmaBuf(const QSize &size, quint32 format, const QVector<uint64_t> &modifiers)
{
return {};
}
std::shared_ptr<DmaBufTexture> Platform::createDmaBufTexture(const QSize &size, quint32 format, uint64_t modifier)
std::shared_ptr<DmaBufTexture> OutputBackend::createDmaBufTexture(const QSize &size, quint32 format, uint64_t modifier)
{
return {};
}
std::shared_ptr<DmaBufTexture> Platform::createDmaBufTexture(const DmaBufParams &attribs)
std::shared_ptr<DmaBufTexture> OutputBackend::createDmaBufTexture(const DmaBufParams &attribs)
{
return createDmaBufTexture({attribs.width, attribs.height}, attribs.format, attribs.modifier);
}
bool Platform::applyOutputChanges(const OutputConfiguration &config)
bool OutputBackend::applyOutputChanges(const OutputConfiguration &config)
{
const auto availableOutputs = outputs();
QVector<Output *> toBeEnabledOutputs;
@ -80,7 +80,7 @@ bool Platform::applyOutputChanges(const OutputConfiguration &config)
return true;
}
Output *Platform::findOutput(const QString &name) const
Output *OutputBackend::findOutput(const QString &name) const
{
const auto candidates = outputs();
for (Output *candidate : candidates) {
@ -91,7 +91,7 @@ Output *Platform::findOutput(const QString &name) const
return nullptr;
}
void Platform::setReady(bool ready)
void OutputBackend::setReady(bool ready)
{
if (m_ready == ready) {
return;
@ -100,37 +100,37 @@ void Platform::setReady(bool ready)
Q_EMIT readyChanged(m_ready);
}
Output *Platform::createVirtualOutput(const QString &name, const QSize &size, double scale)
Output *OutputBackend::createVirtualOutput(const QString &name, const QSize &size, double scale)
{
return nullptr;
}
void Platform::removeVirtualOutput(Output *output)
void OutputBackend::removeVirtualOutput(Output *output)
{
Q_ASSERT(!output);
}
EGLDisplay KWin::Platform::sceneEglDisplay() const
EGLDisplay KWin::OutputBackend::sceneEglDisplay() const
{
return m_eglDisplay;
}
void Platform::setSceneEglDisplay(EGLDisplay display)
void OutputBackend::setSceneEglDisplay(EGLDisplay display)
{
m_eglDisplay = display;
}
QString Platform::supportInformation() const
QString OutputBackend::supportInformation() const
{
return QStringLiteral("Name: %1\n").arg(metaObject()->className());
}
EGLContext Platform::sceneEglGlobalShareContext() const
EGLContext OutputBackend::sceneEglGlobalShareContext() const
{
return m_globalShareContext;
}
void Platform::setSceneEglGlobalShareContext(EGLContext context)
void OutputBackend::setSceneEglGlobalShareContext(EGLContext context)
{
m_globalShareContext = context;
}

View file

@ -6,8 +6,9 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KWIN_PLATFORM_H
#define KWIN_PLATFORM_H
#pragma once
#include <epoxy/egl.h>
#include <kwin_export.h>
#include <kwinglobals.h>
@ -40,11 +41,11 @@ public:
}
};
class KWIN_EXPORT Platform : public QObject
class KWIN_EXPORT OutputBackend : public QObject
{
Q_OBJECT
public:
~Platform() override;
~OutputBackend() override;
virtual bool initialize() = 0;
virtual std::unique_ptr<InputBackend> createInputBackend();
@ -146,7 +147,7 @@ Q_SIGNALS:
void outputRemoved(Output *output);
protected:
explicit Platform(QObject *parent = nullptr);
explicit OutputBackend(QObject *parent = nullptr);
void setReady(bool ready);
QSize initialWindowSize() const
{
@ -168,5 +169,3 @@ private:
};
} // namespace KWin
#endif

View file

@ -34,7 +34,7 @@
#include "tabbox/tabbox.h"
#endif
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "cursor.h"
#include "internalwindow.h"
#include "popup_input_filter.h"
@ -3003,7 +3003,7 @@ void InputRedirection::addInputBackend(std::unique_ptr<InputBackend> &&inputBack
void InputRedirection::setupInputBackends()
{
std::unique_ptr<InputBackend> inputBackend = kwinApp()->platform()->createInputBackend();
std::unique_ptr<InputBackend> inputBackend = kwinApp()->outputBackend()->createInputBackend();
if (inputBackend) {
addInputBackend(std::move(inputBackend));
}

View file

@ -14,7 +14,7 @@
#include "atoms.h"
#include "colormanager.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/session.h"
#include "cursor.h"
#include "effects.h"
@ -155,7 +155,7 @@ void Application::destroyAtoms()
void Application::destroyPlatform()
{
m_platform.reset();
m_outputBackend.reset();
}
void Application::resetCrashesCount()
@ -618,10 +618,10 @@ void Application::setProcessStartupEnvironment(const QProcessEnvironment &enviro
m_processEnvironment = environment;
}
void Application::setPlatform(std::unique_ptr<Platform> &&platform)
void Application::setOutputBackend(std::unique_ptr<OutputBackend> &&backend)
{
Q_ASSERT(!m_platform);
m_platform = std::move(platform);
Q_ASSERT(!m_outputBackend);
m_outputBackend = std::move(backend);
}
void Application::setSession(std::unique_ptr<Session> &&session)

View file

@ -27,7 +27,7 @@ class QCommandLineParser;
namespace KWin
{
class Platform;
class OutputBackend;
class Session;
class X11EventFilter;
class PluginManager;
@ -221,11 +221,11 @@ public:
QProcessEnvironment processStartupEnvironment() const;
void setProcessStartupEnvironment(const QProcessEnvironment &environment);
Platform *platform() const
OutputBackend *outputBackend() const
{
return m_platform.get();
return m_outputBackend.get();
}
void setPlatform(std::unique_ptr<Platform> &&platform);
void setOutputBackend(std::unique_ptr<OutputBackend> &&backend);
Session *session() const
{
@ -366,7 +366,7 @@ private:
bool m_useKActivities = true;
#endif
std::unique_ptr<Session> m_session;
std::unique_ptr<Platform> m_platform;
std::unique_ptr<OutputBackend> m_outputBackend;
bool m_terminating = false;
qreal m_xwaylandScale = 1;
QProcessEnvironment m_processEnvironment;

View file

@ -15,7 +15,7 @@
#include "backends/wayland/wayland_backend.h"
#include "backends/x11/windowed/x11_windowed_backend.h"
#include "composite.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/session.h"
#include "effects.h"
#include "inputmethod.h"
@ -139,7 +139,7 @@ void ApplicationWayland::performStartup()
// first load options - done internally by a different thread
createOptions();
if (!platform()->initialize()) {
if (!outputBackend()->initialize()) {
std::exit(1);
}
@ -149,7 +149,7 @@ void ApplicationWayland::performStartup()
WaylandCompositor::create();
connect(Compositor::self(), &Compositor::sceneCreated, platform(), &Platform::sceneInitialized);
connect(Compositor::self(), &Compositor::sceneCreated, outputBackend(), &OutputBackend::sceneInitialized);
connect(Compositor::self(), &Compositor::sceneCreated, this, &ApplicationWayland::continueStartupWithScene);
}
@ -554,30 +554,30 @@ int main(int argc, char *argv[])
std::cerr << "FATAl ERROR: could not acquire a session" << std::endl;
return 1;
}
a.setPlatform(std::make_unique<KWin::DrmBackend>(a.session()));
a.setOutputBackend(std::make_unique<KWin::DrmBackend>(a.session()));
break;
case BackendType::Virtual:
a.setSession(KWin::Session::create(KWin::Session::Type::Noop));
a.setPlatform(std::make_unique<KWin::VirtualBackend>());
a.setOutputBackend(std::make_unique<KWin::VirtualBackend>());
break;
case BackendType::X11:
a.setSession(KWin::Session::create(KWin::Session::Type::Noop));
a.setPlatform(std::make_unique<KWin::X11WindowedBackend>());
a.setOutputBackend(std::make_unique<KWin::X11WindowedBackend>());
break;
case BackendType::Wayland:
a.setSession(KWin::Session::create(KWin::Session::Type::Noop));
a.setPlatform(std::make_unique<KWin::Wayland::WaylandBackend>());
a.setOutputBackend(std::make_unique<KWin::Wayland::WaylandBackend>());
break;
}
if (!deviceIdentifier.isEmpty()) {
a.platform()->setDeviceIdentifier(deviceIdentifier);
a.outputBackend()->setDeviceIdentifier(deviceIdentifier);
}
if (initialWindowSize.isValid()) {
a.platform()->setInitialWindowSize(initialWindowSize);
a.outputBackend()->setInitialWindowSize(initialWindowSize);
}
a.platform()->setInitialOutputScale(outputScale);
a.platform()->setInitialOutputCount(outputCount);
a.outputBackend()->setInitialOutputScale(outputScale);
a.outputBackend()->setInitialOutputCount(outputCount);
QObject::connect(&a, &KWin::Application::workspaceCreated, server, &KWin::WaylandServer::initWorkspace);
if (!server->socketName().isEmpty()) {

View file

@ -13,7 +13,7 @@
#include <config-kwin.h>
#include "backends/x11/standalone/x11_standalone_platform.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "core/session.h"
#include "outline.h"
#include "screenedge.h"
@ -200,12 +200,12 @@ void ApplicationX11::setReplace(bool replace)
std::unique_ptr<Edge> ApplicationX11::createScreenEdge(ScreenEdges *parent)
{
return static_cast<X11StandalonePlatform *>(platform())->createScreenEdge(parent);
return static_cast<X11StandalonePlatform *>(outputBackend())->createScreenEdge(parent);
}
void ApplicationX11::createPlatformCursor(QObject *parent)
{
static_cast<X11StandalonePlatform *>(platform())->createPlatformCursor(parent);
static_cast<X11StandalonePlatform *>(outputBackend())->createPlatformCursor(parent);
}
std::unique_ptr<OutlineVisual> ApplicationX11::createOutline(Outline *outline)
@ -214,27 +214,27 @@ std::unique_ptr<OutlineVisual> ApplicationX11::createOutline(Outline *outline)
if (auto outlineVisual = Application::createOutline(outline)) {
return outlineVisual;
}
return static_cast<X11StandalonePlatform *>(platform())->createOutline(outline);
return static_cast<X11StandalonePlatform *>(outputBackend())->createOutline(outline);
}
void ApplicationX11::createEffectsHandler(Compositor *compositor, Scene *scene)
{
static_cast<X11StandalonePlatform *>(platform())->createEffectsHandler(compositor, scene);
static_cast<X11StandalonePlatform *>(outputBackend())->createEffectsHandler(compositor, scene);
}
void ApplicationX11::startInteractiveWindowSelection(std::function<void(KWin::Window *)> callback, const QByteArray &cursorName)
{
static_cast<X11StandalonePlatform *>(platform())->startInteractiveWindowSelection(callback, cursorName);
static_cast<X11StandalonePlatform *>(outputBackend())->startInteractiveWindowSelection(callback, cursorName);
}
void ApplicationX11::startInteractivePositionSelection(std::function<void(const QPoint &)> callback)
{
static_cast<X11StandalonePlatform *>(platform())->startInteractivePositionSelection(callback);
static_cast<X11StandalonePlatform *>(outputBackend())->startInteractivePositionSelection(callback);
}
PlatformCursorImage ApplicationX11::cursorImage() const
{
return static_cast<X11StandalonePlatform *>(platform())->cursorImage();
return static_cast<X11StandalonePlatform *>(outputBackend())->cursorImage();
}
void ApplicationX11::lostSelection()
@ -265,7 +265,7 @@ void ApplicationX11::performStartup()
// first load options - done internally by a different thread
createOptions();
if (!platform()->initialize()) {
if (!outputBackend()->initialize()) {
std::exit(1);
}
@ -441,7 +441,7 @@ int main(int argc, char *argv[])
}
a.setSession(KWin::Session::create(KWin::Session::Type::Noop));
a.setPlatform(std::make_unique<KWin::X11StandalonePlatform>());
a.setOutputBackend(std::make_unique<KWin::X11StandalonePlatform>());
a.start();
return a.exec();

View file

@ -12,7 +12,7 @@
#include "config-kwin.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "utils/common.h"
#ifndef KCMRULES
@ -835,7 +835,7 @@ bool Options::loadCompositingConfig(bool force)
}
setCompositingMode(compositingMode);
const bool platformSupportsNoCompositing = kwinApp()->platform()->supportedCompositors().contains(NoCompositing);
const bool platformSupportsNoCompositing = kwinApp()->outputBackend()->supportedCompositors().contains(NoCompositing);
if (m_compositingMode == NoCompositing && platformSupportsNoCompositing) {
setUseCompositing(false);
return false; // do not even detect compositing preferences if explicitly disabled

View file

@ -9,7 +9,7 @@
#include "abstract_egl_backend.h"
#include "composite.h"
#include "core/output.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "dmabuftexture.h"
#include "egl_dmabuf.h"
#include "options.h"
@ -55,24 +55,24 @@ AbstractEglBackend::~AbstractEglBackend()
EGLContext AbstractEglBackend::ensureGlobalShareContext()
{
if (kwinApp()->platform()->sceneEglGlobalShareContext() != EGL_NO_CONTEXT) {
return kwinApp()->platform()->sceneEglGlobalShareContext();
if (kwinApp()->outputBackend()->sceneEglGlobalShareContext() != EGL_NO_CONTEXT) {
return kwinApp()->outputBackend()->sceneEglGlobalShareContext();
}
s_globalShareContext = createContextInternal(EGL_NO_CONTEXT);
kwinApp()->platform()->setSceneEglGlobalShareContext(s_globalShareContext);
kwinApp()->outputBackend()->setSceneEglGlobalShareContext(s_globalShareContext);
return s_globalShareContext;
}
void AbstractEglBackend::destroyGlobalShareContext()
{
const EGLDisplay eglDisplay = kwinApp()->platform()->sceneEglDisplay();
const EGLDisplay eglDisplay = kwinApp()->outputBackend()->sceneEglDisplay();
if (eglDisplay == EGL_NO_DISPLAY || s_globalShareContext == EGL_NO_CONTEXT) {
return;
}
eglDestroyContext(eglDisplay, s_globalShareContext);
s_globalShareContext = EGL_NO_CONTEXT;
kwinApp()->platform()->setSceneEglGlobalShareContext(EGL_NO_CONTEXT);
kwinApp()->outputBackend()->setSceneEglGlobalShareContext(EGL_NO_CONTEXT);
}
void AbstractEglBackend::teardown()
@ -361,7 +361,7 @@ EGLContext AbstractEglBackend::createContextInternal(EGLContext sharedContext)
void AbstractEglBackend::setEglDisplay(const EGLDisplay &display)
{
m_display = display;
kwinApp()->platform()->setSceneEglDisplay(display);
kwinApp()->outputBackend()->setSceneEglDisplay(display);
}
void AbstractEglBackend::setConfig(const EGLConfig &config)

View file

@ -15,7 +15,7 @@
#include "nightcolorsettings.h"
#include "suncalc.h"
#include <core/platform.h>
#include <core/outputbackend.h>
#include <core/session.h>
#include <input.h>
#include <main.h>

View file

@ -9,7 +9,7 @@
*/
#include "eglplatformcontext.h"
#include "core/platform.h"
#include "core/outputbackend.h"
#include "eglhelpers.h"
#include "internalwindow.h"
#include "offscreensurface.h"
@ -33,7 +33,7 @@ namespace QPA
EGLPlatformContext::EGLPlatformContext(QOpenGLContext *context, EGLDisplay display)
: m_eglDisplay(display)
{
create(context->format(), kwinApp()->platform()->sceneEglGlobalShareContext());
create(context->format(), kwinApp()->outputBackend()->sceneEglGlobalShareContext());
}
EGLPlatformContext::~EGLPlatformContext()

Some files were not shown because too many files have changed in this diff Show more