Use AbstractClient instead of XdgShellClient wherever possible
Summary: Currently, we have only one shell client type - XdgShellClient. We use it when we are dealing with Wayland clients. But it isn't really a good idea because we may need to support shell surfaces other than xdg-shell ones, for example input panel surfaces. In order to make kwin more extensible, this change replaces all usages of the XdgShellClient class with the AbstractClient class. Test Plan: Existing tests pass. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D27778
This commit is contained in:
parent
b5392802c2
commit
be759b7d33
89 changed files with 437 additions and 537 deletions
|
@ -252,6 +252,14 @@ void AbstractClient::updateLayer()
|
|||
(*it)->updateLayer();
|
||||
}
|
||||
|
||||
void AbstractClient::placeIn(const QRect &area)
|
||||
{
|
||||
// TODO: Get rid of this method eventually. We need to call setGeometryRestore() because
|
||||
// checkWorkspacePosition() operates on geometryRestore() and because of quick tiling.
|
||||
Placement::self()->place(this, area);
|
||||
setGeometryRestore(frameGeometry());
|
||||
}
|
||||
|
||||
void AbstractClient::invalidateLayer()
|
||||
{
|
||||
m_layer = UnknownLayer;
|
||||
|
@ -2332,7 +2340,7 @@ QRect AbstractClient::iconGeometry() const
|
|||
QRect candidateGeom;
|
||||
|
||||
for (auto i = windowManagementInterface()->minimizedGeometries().constBegin(), end = windowManagementInterface()->minimizedGeometries().constEnd(); i != end; ++i) {
|
||||
AbstractClient *client = waylandServer()->findAbstractClient(i.key());
|
||||
AbstractClient *client = waylandServer()->findClient(i.key());
|
||||
if (!client) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -440,6 +440,7 @@ public:
|
|||
*/
|
||||
virtual bool hasTransient(const AbstractClient* c, bool indirect) const;
|
||||
const QList<AbstractClient*>& transients() const; // Is not indirect
|
||||
virtual void addTransient(AbstractClient *client);
|
||||
virtual void removeTransient(AbstractClient* cl);
|
||||
virtual QList<AbstractClient*> mainClients() const; // Call once before loop , is not indirect
|
||||
QList<AbstractClient*> allMainClients() const; // Call once before loop , is indirect
|
||||
|
@ -613,6 +614,8 @@ public:
|
|||
Layer layer() const override;
|
||||
void updateLayer();
|
||||
|
||||
void placeIn(const QRect &area);
|
||||
|
||||
enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet };
|
||||
virtual void move(int x, int y, ForceGeometry_t force = NormalGeometrySet);
|
||||
void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet);
|
||||
|
@ -970,7 +973,6 @@ protected:
|
|||
virtual void updateColorScheme() = 0;
|
||||
|
||||
void setTransientFor(AbstractClient *transientFor);
|
||||
virtual void addTransient(AbstractClient* cl);
|
||||
/**
|
||||
* Just removes the @p cl from the transients without any further checks.
|
||||
*/
|
||||
|
|
|
@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "kwin_wayland_test.h"
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <KWayland/Client/surface.h>
|
||||
|
||||
|
@ -58,7 +58,6 @@ private:
|
|||
void ActivationTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<AbstractClient *>();
|
||||
qRegisterMetaType<XdgShellClient *>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -101,13 +100,13 @@ void ActivationTest::testSwitchToWindowToLeft()
|
|||
// Create several clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -117,13 +116,13 @@ void ActivationTest::testSwitchToWindowToLeft()
|
|||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -169,13 +168,13 @@ void ActivationTest::testSwitchToWindowToRight()
|
|||
// Create several clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -185,13 +184,13 @@ void ActivationTest::testSwitchToWindowToRight()
|
|||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -237,13 +236,13 @@ void ActivationTest::testSwitchToWindowAbove()
|
|||
// Create several clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -253,13 +252,13 @@ void ActivationTest::testSwitchToWindowAbove()
|
|||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -305,13 +304,13 @@ void ActivationTest::testSwitchToWindowBelow()
|
|||
// Create several clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -321,13 +320,13 @@ void ActivationTest::testSwitchToWindowBelow()
|
|||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -374,14 +373,14 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
// Create several maximized clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
QSignalSpy configureRequestedSpy1(shellSurface1.data(), &XdgShellSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy1.wait());
|
||||
workspace()->slotWindowMaximize();
|
||||
QVERIFY(configureRequestedSpy1.wait());
|
||||
QSignalSpy frameGeometryChangedSpy1(client1, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy1(client1, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy1.isValid());
|
||||
shellSurface1->ackConfigure(configureRequestedSpy1.last().at(2).value<quint32>());
|
||||
Test::render(surface1.data(), configureRequestedSpy1.last().at(0).toSize(), Qt::red);
|
||||
|
@ -389,14 +388,14 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
QSignalSpy configureRequestedSpy2(shellSurface2.data(), &XdgShellSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy2.wait());
|
||||
workspace()->slotWindowMaximize();
|
||||
QVERIFY(configureRequestedSpy2.wait());
|
||||
QSignalSpy frameGeometryChangedSpy2(client2, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy2(client2, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy2.isValid());
|
||||
shellSurface2->ackConfigure(configureRequestedSpy2.last().at(2).value<quint32>());
|
||||
Test::render(surface2.data(), configureRequestedSpy2.last().at(0).toSize(), Qt::red);
|
||||
|
@ -410,13 +409,13 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -459,14 +458,14 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
// Create several maximized clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
QSignalSpy configureRequestedSpy1(shellSurface1.data(), &XdgShellSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy1.wait());
|
||||
workspace()->slotWindowFullScreen();
|
||||
QVERIFY(configureRequestedSpy1.wait());
|
||||
QSignalSpy frameGeometryChangedSpy1(client1, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy1(client1, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy1.isValid());
|
||||
shellSurface1->ackConfigure(configureRequestedSpy1.last().at(2).value<quint32>());
|
||||
Test::render(surface1.data(), configureRequestedSpy1.last().at(0).toSize(), Qt::red);
|
||||
|
@ -474,14 +473,14 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
QSignalSpy configureRequestedSpy2(shellSurface2.data(), &XdgShellSurface::configureRequested);
|
||||
QVERIFY(configureRequestedSpy2.wait());
|
||||
workspace()->slotWindowFullScreen();
|
||||
QVERIFY(configureRequestedSpy2.wait());
|
||||
QSignalSpy frameGeometryChangedSpy2(client2, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy2(client2, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy2.isValid());
|
||||
shellSurface2->ackConfigure(configureRequestedSpy2.last().at(2).value<quint32>());
|
||||
Test::render(surface2.data(), configureRequestedSpy2.last().at(0).toSize(), Qt::red);
|
||||
|
@ -495,13 +494,13 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->isActive());
|
||||
|
||||
QScopedPointer<Surface> surface4(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface4(Test::createXdgShellStableSurface(surface4.data()));
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "xcbutils.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
|
@ -58,7 +57,6 @@ private:
|
|||
|
||||
void ActivitiesTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
#include "generic_scene_opengl_test.h"
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "composite.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include <KWayland/Client/xdgshell.h>
|
||||
|
@ -61,7 +61,7 @@ void BufferSizeChangeTest::testShmBufferSizeChange()
|
|||
QVERIFY(!shellSurface.isNull());
|
||||
|
||||
// set buffer size
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// add a first repaint
|
||||
|
@ -73,7 +73,7 @@ void BufferSizeChangeTest::testShmBufferSizeChange()
|
|||
// now change buffer size
|
||||
Test::render(surface.data(), QSize(30, 10), Qt::red);
|
||||
|
||||
QSignalSpy damagedSpy(client, &XdgShellClient::damaged);
|
||||
QSignalSpy damagedSpy(client, &AbstractClient::damaged);
|
||||
QVERIFY(damagedSpy.isValid());
|
||||
QVERIFY(damagedSpy.wait());
|
||||
KWin::Compositor::self()->addRepaintFull();
|
||||
|
@ -98,7 +98,7 @@ void BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface()
|
|||
|
||||
// set buffer sizes
|
||||
Test::render(surface.data(), QSize(30, 10), Qt::red);
|
||||
XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *parent = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(parent);
|
||||
|
||||
// add a first repaint
|
||||
|
@ -108,7 +108,7 @@ void BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface()
|
|||
QVERIFY(swapSpy.wait());
|
||||
|
||||
// change buffer size of sub surface
|
||||
QSignalSpy damagedParentSpy(parent, &XdgShellClient::damaged);
|
||||
QSignalSpy damagedParentSpy(parent, &AbstractClient::damaged);
|
||||
QVERIFY(damagedParentSpy.isValid());
|
||||
Test::render(surface.data(), QSize(20, 10), Qt::red);
|
||||
parentSurface->commit(Surface::CommitFlag::None);
|
||||
|
|
|
@ -21,13 +21,13 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "atoms.h"
|
||||
#include "x11client.h"
|
||||
#include "deleted.h"
|
||||
#include "platform.h"
|
||||
#include "rules.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -69,7 +69,6 @@ private Q_SLOTS:
|
|||
void TestDbusInterface::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -135,7 +134,7 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient()
|
|||
Test::render(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(clientAddedSpy.isEmpty());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto client = clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
auto client = clientAddedSpy.first().first().value<AbstractClient *>();
|
||||
QVERIFY(client);
|
||||
|
||||
// let's get the window info
|
||||
|
@ -226,7 +225,7 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient()
|
|||
|
||||
// finally close window
|
||||
const auto id = client->internalId();
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &AbstractClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
|
|
@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "debug_console.h"
|
||||
#include "internal_client.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xcbutils.h"
|
||||
|
@ -60,7 +60,6 @@ void DebugConsoleTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "touch_input.h"
|
||||
#include "screenedge.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include <kwineffects.h>
|
||||
|
@ -135,7 +134,6 @@ void DecorationInputTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "platform.h"
|
||||
#include "x11client.h"
|
||||
#include "cursor.h"
|
||||
|
@ -26,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "xcbutils.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
|
@ -52,7 +52,6 @@ private:
|
|||
|
||||
void X11DesktopWindowTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KDecoration2/Decoration>
|
||||
|
@ -54,7 +53,6 @@ private Q_SLOTS:
|
|||
void DontCrashAuroraeDestroyDecoTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "effectloader.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "scripting/scriptedeffect.h"
|
||||
|
@ -56,7 +55,6 @@ private Q_SLOTS:
|
|||
void DontCrashCancelAnimationFromAnimationEndedTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -67,7 +66,6 @@ void DontCrashCursorPhysicalSizeEmpty::cleanup()
|
|||
|
||||
void DontCrashCursorPhysicalSizeEmpty::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KDecoration2/Decoration>
|
||||
|
@ -50,7 +49,6 @@ private Q_SLOTS:
|
|||
|
||||
void DontCrashEmptyDecorationTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/server_decoration.h>
|
||||
|
@ -56,7 +55,6 @@ private Q_SLOTS:
|
|||
|
||||
void DontCrashNoBorder::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -60,7 +59,6 @@ void DontCrashReinitializeCompositorTest::initTestCase()
|
|||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -134,7 +132,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Make sure that only the test effect is loaded.
|
||||
|
@ -147,7 +145,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor()
|
|||
QVERIFY(!effect->isActive());
|
||||
|
||||
// Close the test client.
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &AbstractClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
|
|
@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "keyboard_input.h"
|
||||
#include "platform.h"
|
||||
#include "pointer_input.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "useractions.h"
|
||||
#include "wayland_server.h"
|
||||
|
@ -56,7 +56,6 @@ private Q_SLOTS:
|
|||
|
||||
void TestDontCrashUseractionsMenu::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -57,7 +56,6 @@ void DesktopSwitchingAnimationTest::initTestCase()
|
|||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -128,7 +126,7 @@ void DesktopSwitchingAnimationTest::testSwitchDesktops()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->desktops().count(), 1);
|
||||
QCOMPARE(client->desktops().first(), VirtualDesktopManager::self()->desktops().first());
|
||||
|
|
|
@ -18,12 +18,12 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "composite.h"
|
||||
#include "effects.h"
|
||||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -55,7 +55,6 @@ private:
|
|||
void FadeTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -57,7 +56,6 @@ void MaximizeAnimationTest::initTestCase()
|
|||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -133,7 +131,7 @@ void MaximizeAnimationTest::testMaximizeRestore()
|
|||
|
||||
// Draw contents of the surface.
|
||||
shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QCOMPARE(client->maximizeMode(), MaximizeMode::MaximizeRestore);
|
||||
|
@ -157,9 +155,9 @@ void MaximizeAnimationTest::testMaximizeRestore()
|
|||
QVERIFY(!effect->isActive());
|
||||
|
||||
// Maximize the client.
|
||||
QSignalSpy frameGeometryChangedSpy(client, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
QSignalSpy maximizeChangedSpy(client, qOverload<AbstractClient *, bool, bool>(&XdgShellClient::clientMaximizedStateChanged));
|
||||
QSignalSpy maximizeChangedSpy(client, qOverload<AbstractClient *, bool, bool>(&AbstractClient::clientMaximizedStateChanged));
|
||||
QVERIFY(maximizeChangedSpy.isValid());
|
||||
|
||||
workspace()->slotWindowMaximize();
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -59,7 +58,6 @@ void MinimizeAnimationTest::initTestCase()
|
|||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -134,7 +132,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize()
|
|||
plasmaPanelShellSurface->setRole(PlasmaShellSurface::Role::Panel);
|
||||
plasmaPanelShellSurface->setPosition(panelRect.topLeft());
|
||||
plasmaPanelShellSurface->setPanelBehavior(PlasmaShellSurface::PanelBehavior::AlwaysVisible);
|
||||
XdgShellClient *panel = Test::renderAndWaitForShown(panelSurface.data(), panelRect.size(), Qt::blue);
|
||||
AbstractClient *panel = Test::renderAndWaitForShown(panelSurface.data(), panelRect.size(), Qt::blue);
|
||||
QVERIFY(panel);
|
||||
QVERIFY(panel->isDock());
|
||||
QCOMPARE(panel->frameGeometry(), panelRect);
|
||||
|
@ -146,7 +144,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
QVERIFY(plasmaWindowCreatedSpy.wait());
|
||||
QCOMPARE(plasmaWindowCreatedSpy.count(), 2);
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "internal_client.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "useractions.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -66,7 +65,6 @@ void PopupOpenCloseAnimationTest::initTestCase()
|
|||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -119,7 +117,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
QVERIFY(!mainWindowSurface.isNull());
|
||||
QScopedPointer<XdgShellSurface> mainWindowShellSurface(Test::createXdgShellStableSurface(mainWindowSurface.data()));
|
||||
QVERIFY(!mainWindowShellSurface.isNull());
|
||||
XdgShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(mainWindow);
|
||||
|
||||
// Load effect that will be tested.
|
||||
|
@ -139,7 +137,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
positioner.setAnchorEdge(Qt::BottomEdge | Qt::LeftEdge);
|
||||
QScopedPointer<XdgShellPopup> popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), mainWindowShellSurface.data(), positioner));
|
||||
QVERIFY(!popupShellSurface.isNull());
|
||||
XdgShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red);
|
||||
AbstractClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red);
|
||||
QVERIFY(popup);
|
||||
QVERIFY(popup->isPopupWindow());
|
||||
QCOMPARE(popup->transientFor(), mainWindow);
|
||||
|
@ -149,7 +147,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
QTRY_VERIFY(!effect->isActive());
|
||||
|
||||
// Destroy the popup, it should not be animated.
|
||||
QSignalSpy popupClosedSpy(popup, &XdgShellClient::windowClosed);
|
||||
QSignalSpy popupClosedSpy(popup, &AbstractClient::windowClosed);
|
||||
QVERIFY(popupClosedSpy.isValid());
|
||||
popupShellSurface.reset();
|
||||
popupSurface.reset();
|
||||
|
@ -179,7 +177,7 @@ void PopupOpenCloseAnimationTest::testAnimateUserActionsPopup()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Load effect that will be tested.
|
||||
|
@ -234,7 +232,7 @@ void PopupOpenCloseAnimationTest::testAnimateDecorationTooltips()
|
|||
QScopedPointer<XdgDecoration> deco(Test::xdgDecorationManager()->getToplevelDecoration(shellSurface.data()));
|
||||
QVERIFY(!deco.isNull());
|
||||
deco->setMode(XdgDecoration::Mode::ServerSide);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isDecorated());
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include "scripting/scriptedeffect.h"
|
||||
#include "libkwineffects/anidata_p.h"
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "composite.h"
|
||||
#include "cursor.h"
|
||||
#include "deleted.h"
|
||||
|
@ -29,7 +30,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -143,7 +143,6 @@ bool ScriptedEffectWithDebugSpy::load(const QString &name)
|
|||
|
||||
void ScriptedEffectsTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
|
@ -511,7 +510,7 @@ void ScriptedEffectsTest::testGrab()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -544,7 +543,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindow()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -581,7 +580,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindowForced()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -612,7 +611,7 @@ void ScriptedEffectsTest::testUngrab()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -655,7 +654,7 @@ void ScriptedEffectsTest::testRedirect()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -733,7 +732,7 @@ void ScriptedEffectsTest::testComplete()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -61,7 +60,6 @@ private Q_SLOTS:
|
|||
void SlidingPopupsTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -61,7 +60,6 @@ void ToplevelOpenCloseAnimationTest::initTestCase()
|
|||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -137,7 +135,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(effect->isActive());
|
||||
|
||||
|
@ -146,7 +144,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
|
|||
|
||||
// Close the test client, the effect should start animating the disappearing
|
||||
// of the client.
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &AbstractClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
@ -181,7 +179,7 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups()
|
|||
QVERIFY(!mainWindowSurface.isNull());
|
||||
QScopedPointer<XdgShellSurface> mainWindowShellSurface(Test::createXdgShellStableSurface(mainWindowSurface.data()));
|
||||
QVERIFY(!mainWindowShellSurface.isNull());
|
||||
XdgShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(mainWindow);
|
||||
|
||||
// Load effect that will be tested.
|
||||
|
@ -201,14 +199,14 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups()
|
|||
positioner.setAnchorEdge(Qt::BottomEdge | Qt::LeftEdge);
|
||||
QScopedPointer<XdgShellPopup> popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), mainWindowShellSurface.data(), positioner));
|
||||
QVERIFY(!popupShellSurface.isNull());
|
||||
XdgShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red);
|
||||
AbstractClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red);
|
||||
QVERIFY(popup);
|
||||
QVERIFY(popup->isPopupWindow());
|
||||
QCOMPARE(popup->transientFor(), mainWindow);
|
||||
QVERIFY(!effect->isActive());
|
||||
|
||||
// Destroy the popup, it should not be animated.
|
||||
QSignalSpy popupClosedSpy(popup, &XdgShellClient::windowClosed);
|
||||
QSignalSpy popupClosedSpy(popup, &AbstractClient::windowClosed);
|
||||
QVERIFY(popupClosedSpy.isValid());
|
||||
popupShellSurface.reset();
|
||||
popupSurface.reset();
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -55,7 +54,6 @@ private:
|
|||
void TranslucencyTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -18,12 +18,12 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "composite.h"
|
||||
#include "effects.h"
|
||||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -50,7 +50,6 @@ private Q_SLOTS:
|
|||
|
||||
void WindowGeometryTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -56,7 +55,6 @@ private Q_SLOTS:
|
|||
|
||||
void WobblyWindowsShadeTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -18,12 +18,12 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "generic_scene_opengl_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "composite.h"
|
||||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "effect_builtins.h"
|
||||
|
||||
|
@ -49,7 +49,6 @@ void GenericSceneOpenGLTest::cleanup()
|
|||
|
||||
void GenericSceneOpenGLTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "internal_client.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "useractions.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -65,7 +64,6 @@ void GlobalShortcutsTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -54,7 +54,6 @@ private Q_SLOTS:
|
|||
|
||||
void TestIdleInhibition::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -268,7 +267,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
|
|||
QCOMPARE(inhibitedSpy.count(), 1);
|
||||
|
||||
// Unmap the client.
|
||||
QSignalSpy hiddenSpy(c, &XdgShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(c, &AbstractClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
@ -280,7 +279,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
|
|||
QCOMPARE(inhibitedSpy.count(), 2);
|
||||
|
||||
// Map the client.
|
||||
QSignalSpy windowShownSpy(c, &XdgShellClient::windowShown);
|
||||
QSignalSpy windowShownSpy(c, &AbstractClient::windowShown);
|
||||
QVERIFY(windowShownSpy.isValid());
|
||||
Test::render(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(windowShownSpy.wait());
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -61,7 +60,6 @@ private:
|
|||
|
||||
void InputStackingOrderTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "internal_client.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -185,7 +184,6 @@ void InternalWindowTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -18,10 +18,10 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "keyboard_input.h"
|
||||
#include "keyboard_layout.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -74,7 +74,6 @@ void KeyboardLayoutTest::reconfigureLayouts()
|
|||
|
||||
void KeyboardLayoutTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -18,10 +18,10 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "keyboard_input.h"
|
||||
#include "keyboard_layout.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -57,7 +57,6 @@ void KeymapCreationFailureTest::initTestCase()
|
|||
qputenv("XKB_DEFAULT_VARIANT", "no");
|
||||
qputenv("XKB_DEFAULT_OPTIONS", "no");
|
||||
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -58,7 +58,6 @@ class Xwayland;
|
|||
}
|
||||
|
||||
class AbstractClient;
|
||||
class XdgShellClient;
|
||||
|
||||
class WaylandTestApplication : public ApplicationWaylandAbstract
|
||||
{
|
||||
|
@ -181,15 +180,15 @@ void render(KWayland::Client::Surface *surface, const QSize &size, const QColor
|
|||
void render(KWayland::Client::Surface *surface, const QImage &img);
|
||||
|
||||
/**
|
||||
* Waits till a new XdgShellClient is shown and returns the created XdgShellClient.
|
||||
* If no XdgShellClient gets shown during @p timeout @c null is returned.
|
||||
* Waits till a new AbstractClient is shown and returns the created AbstractClient.
|
||||
* If no AbstractClient gets shown during @p timeout @c null is returned.
|
||||
*/
|
||||
XdgShellClient *waitForWaylandWindowShown(int timeout = 5000);
|
||||
AbstractClient *waitForWaylandWindowShown(int timeout = 5000);
|
||||
|
||||
/**
|
||||
* Combination of @link{render} and @link{waitForWaylandWindowShown}.
|
||||
*/
|
||||
XdgShellClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32, int timeout = 5000);
|
||||
AbstractClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32, int timeout = 5000);
|
||||
|
||||
/**
|
||||
* Waits for the @p client to be destroyed.
|
||||
|
|
|
@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "input.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "scripting/scripting.h"
|
||||
#include "useractions.h"
|
||||
#include "virtualdesktops.h"
|
||||
|
@ -57,7 +57,6 @@ private Q_SLOTS:
|
|||
|
||||
void KWinBindingsTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -183,7 +182,6 @@ AbstractClient *LockScreenTest::showWindow()
|
|||
|
||||
void LockScreenTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "decorations/decorationbridge.h"
|
||||
#include "decorations/settings.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -61,7 +61,6 @@ private Q_SLOTS:
|
|||
|
||||
void TestMaximized::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -202,7 +201,7 @@ void TestMaximized::testInitiallyMaximized()
|
|||
|
||||
// Now let's render in an incorrect size.
|
||||
shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->frameGeometry(), QRect(0, 0, 100, 50));
|
||||
QEXPECT_FAIL("", "Should go out of maximzied", Continue);
|
||||
|
@ -249,7 +248,7 @@ void TestMaximized::testBorderlessMaximizedWindow()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QCOMPARE(client->maximizeMode(), MaximizeMode::MaximizeRestore);
|
||||
|
@ -326,7 +325,7 @@ void TestMaximized::testBorderlessMaximizedWindowNoClientSideDecoration()
|
|||
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
QSignalSpy frameGeometryChangedSpy(client, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
QSignalSpy sizeChangeRequestedSpy(xdgShellSurface.data(), &XdgShellSurface::sizeChanged);
|
||||
QVERIFY(sizeChangeRequestedSpy.isValid());
|
||||
|
|
|
@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "deleted.h"
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -94,7 +93,6 @@ void MoveResizeWindowTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -814,7 +812,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingX11Panel()
|
|||
QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint);
|
||||
|
||||
// and close
|
||||
QSignalSpy windowClosedSpy(testWindow, &XdgShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(testWindow, &AbstractClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
@ -880,7 +878,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
|
|||
QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint);
|
||||
|
||||
// and destroy the panel again
|
||||
QSignalSpy panelClosedSpy(panel, &XdgShellClient::windowClosed);
|
||||
QSignalSpy panelClosedSpy(panel, &AbstractClient::windowClosed);
|
||||
QVERIFY(panelClosedSpy.isValid());
|
||||
plasmaSurface.reset();
|
||||
panelShellSurface.reset();
|
||||
|
@ -891,7 +889,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
|
|||
QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint);
|
||||
|
||||
// and close
|
||||
QSignalSpy windowClosedSpy(testWindow, &XdgShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(testWindow, &AbstractClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
@ -918,7 +916,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboard()
|
|||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
client->move(100, 300);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->frameGeometry(), QRect(100, 300, 500, 800));
|
||||
|
@ -961,7 +959,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithMaximize()
|
|||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
client->move(100, 300);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->frameGeometry(), QRect(100, 300, 500, 800));
|
||||
|
@ -1012,7 +1010,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithFullScreen()
|
|||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
client->move(100, 300);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->frameGeometry(), QRect(100, 300, 500, 800));
|
||||
|
@ -1053,7 +1051,7 @@ void MoveResizeWindowTest::testDestroyMoveClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start moving the client.
|
||||
|
@ -1090,7 +1088,7 @@ void MoveResizeWindowTest::testDestroyResizeClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start resizing the client.
|
||||
|
@ -1127,7 +1125,7 @@ void MoveResizeWindowTest::testUnmapMoveClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start resizing the client.
|
||||
|
@ -1146,7 +1144,7 @@ void MoveResizeWindowTest::testUnmapMoveClient()
|
|||
QCOMPARE(client->isResize(), false);
|
||||
|
||||
// Unmap the client while we're moving it.
|
||||
QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(client, &AbstractClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
@ -1173,7 +1171,7 @@ void MoveResizeWindowTest::testUnmapResizeClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start resizing the client.
|
||||
|
@ -1192,7 +1190,7 @@ void MoveResizeWindowTest::testUnmapResizeClient()
|
|||
QCOMPARE(client->isResize(), true);
|
||||
|
||||
// Unmap the client while we're resizing it.
|
||||
QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(client, &AbstractClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
|
|
@ -18,11 +18,11 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -90,7 +90,6 @@ void TestPlacement::cleanup()
|
|||
|
||||
void TestPlacement::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -251,7 +250,7 @@ void TestPlacement::testPlaceCentered()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->frameGeometry(), QRect(590, 487, 100, 50));
|
||||
|
||||
|
@ -273,7 +272,7 @@ void TestPlacement::testPlaceUnderMouse()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->frameGeometry(), QRect(151, 276, 100, 50));
|
||||
|
||||
|
@ -292,21 +291,21 @@ void TestPlacement::testPlaceCascaded()
|
|||
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client1);
|
||||
QCOMPARE(client1->pos(), QPoint(0, 0));
|
||||
QCOMPARE(client1->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QCOMPARE(client2->pos(), client1->pos() + workspace()->cascadeOffset(client2));
|
||||
QCOMPARE(client2->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
QVERIFY(client3);
|
||||
QCOMPARE(client3->pos(), client2->pos() + workspace()->cascadeOffset(client3));
|
||||
QCOMPARE(client3->size(), QSize(100, 50));
|
||||
|
@ -330,20 +329,20 @@ void TestPlacement::testPlaceRandom()
|
|||
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client1);
|
||||
QCOMPARE(client1->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->pos() != client1->pos());
|
||||
QCOMPARE(client2->size(), QSize(100, 50));
|
||||
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
AbstractClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->pos() != client1->pos());
|
||||
QVERIFY(client3->pos() != client2->pos());
|
||||
|
|
|
@ -18,9 +18,9 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "platform.h"
|
||||
#include "cursor.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -70,7 +70,7 @@ private:
|
|||
|
||||
void PlasmaSurfaceTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/compositor.h>
|
||||
|
@ -68,7 +67,6 @@ private:
|
|||
|
||||
void PlasmaWindowTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -245,7 +243,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow()
|
|||
// first create the parent window
|
||||
QScopedPointer<Surface> parentSurface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> parentShellSurface(Test::createXdgShellStableSurface(parentSurface.data()));
|
||||
XdgShellClient *parentClient = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *parentClient = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(parentClient);
|
||||
QVERIFY(plasmaWindowCreatedSpy.wait());
|
||||
QCOMPARE(plasmaWindowCreatedSpy.count(), 1);
|
||||
|
@ -256,7 +254,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow()
|
|||
positioner.setGravity(Qt::BottomEdge | Qt::RightEdge);
|
||||
QScopedPointer<Surface> popupSurface(Test::createSurface());
|
||||
QScopedPointer<XdgShellPopup> popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), parentShellSurface.data(), positioner));
|
||||
XdgShellClient *popupClient = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::blue);
|
||||
AbstractClient *popupClient = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::blue);
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(!plasmaWindowCreatedSpy.wait(100));
|
||||
QCOMPARE(plasmaWindowCreatedSpy.count(), 1);
|
||||
|
@ -280,7 +278,7 @@ void PlasmaWindowTest::testLockScreenNoPlasmaWindow()
|
|||
// lock
|
||||
ScreenLocker::KSldApp::self()->lock(ScreenLocker::EstablishLock::Immediate);
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
QVERIFY(clientAddedSpy.first().first().value<XdgShellClient *>()->isLockScreen());
|
||||
QVERIFY(clientAddedSpy.first().first().value<AbstractClient *>()->isLockScreen());
|
||||
// should not be sent to the client
|
||||
QVERIFY(plasmaWindowCreatedSpy.isEmpty());
|
||||
QVERIFY(!plasmaWindowCreatedSpy.wait());
|
||||
|
|
|
@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "keyboard_input.h"
|
||||
#include "platform.h"
|
||||
#include "pointer_input.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -69,7 +69,6 @@ private Q_SLOTS:
|
|||
void TestPointerConstraints::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<PointerFunc>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_cursor_theme.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/buffer.h>
|
||||
|
@ -140,7 +139,6 @@ private:
|
|||
|
||||
void PointerInputTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -1209,7 +1207,7 @@ void PointerInputTest::testPopup()
|
|||
popupShellSurface->requestGrab(Test::waylandSeat(), 0); // FIXME: Serial.
|
||||
render(popupSurface, positioner.initialSize());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto popupClient = clientAddedSpy.last().first().value<XdgShellClient *>();
|
||||
auto popupClient = clientAddedSpy.last().first().value<AbstractClient *>();
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(popupClient != window);
|
||||
QCOMPARE(window, workspace()->activeClient());
|
||||
|
@ -1300,7 +1298,7 @@ void PointerInputTest::testDecoCancelsPopup()
|
|||
popupShellSurface->requestGrab(Test::waylandSeat(), 0); // FIXME: Serial.
|
||||
render(popupSurface, positioner.initialSize());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto popupClient = clientAddedSpy.last().first().value<XdgShellClient *>();
|
||||
auto popupClient = clientAddedSpy.last().first().value<AbstractClient *>();
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(popupClient != window);
|
||||
QCOMPARE(window, workspace()->activeClient());
|
||||
|
@ -1362,7 +1360,7 @@ void PointerInputTest::testWindowUnderCursorWhileButtonPressed()
|
|||
QVERIFY(popupShellSurface);
|
||||
render(popupSurface, positioner.initialSize());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto popupClient = clientAddedSpy.last().first().value<XdgShellClient *>();
|
||||
auto popupClient = clientAddedSpy.last().first().value<AbstractClient *>();
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(popupClient != window);
|
||||
QVERIFY(window->frameGeometry().contains(Cursor::pos()));
|
||||
|
@ -1501,7 +1499,7 @@ void PointerInputTest::testResizeCursor()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
||||
// move the cursor to the test position
|
||||
|
@ -1571,7 +1569,7 @@ void PointerInputTest::testMoveCursor()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
||||
// move cursor to the test position
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "scripting/scripting.h"
|
||||
|
||||
#include <KDecoration2/DecoratedClient>
|
||||
|
@ -92,7 +91,6 @@ private:
|
|||
|
||||
void QuickTilingTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -38,13 +38,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "kwin_wayland_test.h"
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "composite.h"
|
||||
#include "effect_builtins.h"
|
||||
#include "effectloader.h"
|
||||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "shadow.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -112,7 +112,6 @@ void SceneOpenGLShadowTest::initTestCase()
|
|||
{
|
||||
// Copied from generic_scene_opengl_test.cpp
|
||||
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -42,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "kwin_wayland_test.h"
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "composite.h"
|
||||
#include "effect_builtins.h"
|
||||
#include "effectloader.h"
|
||||
|
@ -49,7 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "platform.h"
|
||||
#include "plugins/scenes/qpainter/scene_qpainter.h"
|
||||
#include "shadow.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -116,7 +116,6 @@ void SceneQPainterShadowTest::initTestCase()
|
|||
{
|
||||
// Copied from scene_qpainter_test.cpp
|
||||
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "effect_builtins.h"
|
||||
#include "workspace.h"
|
||||
|
@ -68,7 +67,6 @@ void SceneQPainterTest::cleanup()
|
|||
|
||||
void SceneQPainterTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <netwm.h>
|
||||
|
@ -51,7 +50,6 @@ private Q_SLOTS:
|
|||
|
||||
void ScreenEdgeClientShowTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "kwin_wayland_test.h"
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "scripting/scripting.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <KPackage/PackageLoader>
|
||||
#include <KWayland/Client/surface.h>
|
||||
|
@ -55,7 +55,6 @@ void MinimizeAllScriptTest::initTestCase()
|
|||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
|
||||
qRegisterMetaType<AbstractClient *>();
|
||||
qRegisterMetaType<XdgShellClient *>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -122,14 +121,14 @@ void MinimizeAllScriptTest::testMinimizeUnminimize()
|
|||
// Create a couple of test clients.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client1);
|
||||
QVERIFY(client1->isActive());
|
||||
QVERIFY(client1->isMinimizable());
|
||||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::red);
|
||||
AbstractClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
QVERIFY(client2->isMinimizable());
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KDecoration2/Decoration>
|
||||
|
@ -49,7 +48,6 @@ private Q_SLOTS:
|
|||
|
||||
void ShadeTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -45,7 +45,6 @@ private Q_SLOTS:
|
|||
|
||||
void ShowingDesktopTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "deleted.h"
|
||||
#include "main.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -67,7 +66,6 @@ void StackingOrderTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -102,7 +100,7 @@ void StackingOrderTest::testTransientIsAboveParent()
|
|||
KWayland::Client::XdgShellSurface *parentShellSurface =
|
||||
Test::createXdgShellStableSurface(parentSurface, parentSurface);
|
||||
QVERIFY(parentShellSurface);
|
||||
XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
AbstractClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
QVERIFY(parent);
|
||||
QVERIFY(parent->isActive());
|
||||
QVERIFY(!parent->isTransient());
|
||||
|
@ -118,7 +116,7 @@ void StackingOrderTest::testTransientIsAboveParent()
|
|||
Test::createXdgShellStableSurface(transientSurface, transientSurface);
|
||||
QVERIFY(transientShellSurface);
|
||||
transientShellSurface->setTransientFor(parentShellSurface);
|
||||
XdgShellClient *transient = Test::renderAndWaitForShown(
|
||||
AbstractClient *transient = Test::renderAndWaitForShown(
|
||||
transientSurface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient);
|
||||
QVERIFY(transient->isActive());
|
||||
|
@ -146,7 +144,7 @@ void StackingOrderTest::testRaiseTransient()
|
|||
KWayland::Client::XdgShellSurface *parentShellSurface =
|
||||
Test::createXdgShellStableSurface(parentSurface, parentSurface);
|
||||
QVERIFY(parentShellSurface);
|
||||
XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
AbstractClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
QVERIFY(parent);
|
||||
QVERIFY(parent->isActive());
|
||||
QVERIFY(!parent->isTransient());
|
||||
|
@ -162,7 +160,7 @@ void StackingOrderTest::testRaiseTransient()
|
|||
Test::createXdgShellStableSurface(transientSurface, transientSurface);
|
||||
QVERIFY(transientShellSurface);
|
||||
transientShellSurface->setTransientFor(parentShellSurface);
|
||||
XdgShellClient *transient = Test::renderAndWaitForShown(
|
||||
AbstractClient *transient = Test::renderAndWaitForShown(
|
||||
transientSurface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient);
|
||||
QTRY_VERIFY(transient->isActive());
|
||||
|
@ -178,7 +176,7 @@ void StackingOrderTest::testRaiseTransient()
|
|||
KWayland::Client::XdgShellSurface *anotherShellSurface =
|
||||
Test::createXdgShellStableSurface(anotherSurface, anotherSurface);
|
||||
QVERIFY(anotherShellSurface);
|
||||
XdgShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
AbstractClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(anotherClient);
|
||||
QVERIFY(anotherClient->isActive());
|
||||
QVERIFY(!anotherClient->isTransient());
|
||||
|
@ -229,7 +227,7 @@ void StackingOrderTest::testDeletedTransient()
|
|||
KWayland::Client::XdgShellSurface *parentShellSurface =
|
||||
Test::createXdgShellStableSurface(parentSurface, parentSurface);
|
||||
QVERIFY(parentShellSurface);
|
||||
XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
AbstractClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
QVERIFY(parent);
|
||||
QVERIFY(parent->isActive());
|
||||
QVERIFY(!parent->isTransient());
|
||||
|
@ -244,7 +242,7 @@ void StackingOrderTest::testDeletedTransient()
|
|||
Test::createXdgShellStableSurface(transient1Surface, transient1Surface);
|
||||
QVERIFY(transient1ShellSurface);
|
||||
transient1ShellSurface->setTransientFor(parentShellSurface);
|
||||
XdgShellClient *transient1 = Test::renderAndWaitForShown(
|
||||
AbstractClient *transient1 = Test::renderAndWaitForShown(
|
||||
transient1Surface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient1);
|
||||
QTRY_VERIFY(transient1->isActive());
|
||||
|
@ -261,7 +259,7 @@ void StackingOrderTest::testDeletedTransient()
|
|||
Test::createXdgShellStableSurface(transient2Surface, transient2Surface);
|
||||
QVERIFY(transient2ShellSurface);
|
||||
transient2ShellSurface->setTransientFor(transient1ShellSurface);
|
||||
XdgShellClient *transient2 = Test::renderAndWaitForShown(
|
||||
AbstractClient *transient2 = Test::renderAndWaitForShown(
|
||||
transient2Surface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient2);
|
||||
QTRY_VERIFY(transient2->isActive());
|
||||
|
@ -277,14 +275,14 @@ void StackingOrderTest::testDeletedTransient()
|
|||
QTRY_VERIFY(!transient2->isActive());
|
||||
|
||||
// Close the top-most transient.
|
||||
connect(transient2, &XdgShellClient::windowClosed, this,
|
||||
connect(transient2, &AbstractClient::windowClosed, this,
|
||||
[](Toplevel *toplevel, Deleted *deleted) {
|
||||
Q_UNUSED(toplevel)
|
||||
deleted->refWindow();
|
||||
}
|
||||
);
|
||||
|
||||
QSignalSpy windowClosedSpy(transient2, &XdgShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(transient2, &AbstractClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
delete transient2ShellSurface;
|
||||
delete transient2Surface;
|
||||
|
@ -571,7 +569,7 @@ void StackingOrderTest::testRaiseGroupTransient()
|
|||
KWayland::Client::XdgShellSurface *anotherShellSurface =
|
||||
Test::createXdgShellStableSurface(anotherSurface, anotherSurface);
|
||||
QVERIFY(anotherShellSurface);
|
||||
XdgShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
AbstractClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(anotherClient);
|
||||
QVERIFY(anotherClient->isActive());
|
||||
QVERIFY(!anotherClient->isTransient());
|
||||
|
@ -826,7 +824,7 @@ void StackingOrderTest::testKeepAbove()
|
|||
KWayland::Client::XdgShellSurface *clientAShellSurface =
|
||||
Test::createXdgShellStableSurface(clientASurface, clientASurface);
|
||||
QVERIFY(clientAShellSurface);
|
||||
XdgShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
AbstractClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientA);
|
||||
QVERIFY(clientA->isActive());
|
||||
QVERIFY(!clientA->keepAbove());
|
||||
|
@ -840,7 +838,7 @@ void StackingOrderTest::testKeepAbove()
|
|||
KWayland::Client::XdgShellSurface *clientBShellSurface =
|
||||
Test::createXdgShellStableSurface(clientBSurface, clientBSurface);
|
||||
QVERIFY(clientBShellSurface);
|
||||
XdgShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
AbstractClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientB);
|
||||
QVERIFY(clientB->isActive());
|
||||
QVERIFY(!clientB->keepAbove());
|
||||
|
@ -874,7 +872,7 @@ void StackingOrderTest::testKeepBelow()
|
|||
KWayland::Client::XdgShellSurface *clientAShellSurface =
|
||||
Test::createXdgShellStableSurface(clientASurface, clientASurface);
|
||||
QVERIFY(clientAShellSurface);
|
||||
XdgShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
AbstractClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientA);
|
||||
QVERIFY(clientA->isActive());
|
||||
QVERIFY(!clientA->keepBelow());
|
||||
|
@ -888,7 +886,7 @@ void StackingOrderTest::testKeepBelow()
|
|||
KWayland::Client::XdgShellSurface *clientBShellSurface =
|
||||
Test::createXdgShellStableSurface(clientBSurface, clientBSurface);
|
||||
QVERIFY(clientBShellSurface);
|
||||
XdgShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
AbstractClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientB);
|
||||
QVERIFY(clientB->isActive());
|
||||
QVERIFY(!clientB->keepBelow());
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/compositor.h>
|
||||
|
@ -67,7 +66,6 @@ private:
|
|||
|
||||
void StrutsTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -168,7 +166,7 @@ void StrutsTest::testWaylandStruts()
|
|||
|
||||
QFETCH(QVector<QRect>, windowGeometries);
|
||||
// create the panels
|
||||
QHash<Surface*, XdgShellClient *> clients;
|
||||
QHash<Surface*, AbstractClient *> clients;
|
||||
for (auto it = windowGeometries.constBegin(), end = windowGeometries.constEnd(); it != end; it++) {
|
||||
const QRect windowGeometry = *it;
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
|
@ -246,7 +244,7 @@ void StrutsTest::testMoveWaylandPanel()
|
|||
QCOMPARE(workspace()->clientArea(MaximizeArea, 1, 1), QRect(1280, 0, 1280, 1024));
|
||||
QCOMPARE(workspace()->clientArea(WorkArea, 0, 1), QRect(0, 0, 2560, 1000));
|
||||
|
||||
QSignalSpy frameGeometryChangedSpy(c, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(c, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
plasmaSurface->setPosition(QPoint(1280, 1000));
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
|
|
|
@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "input.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "tabbox/tabbox.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -52,7 +52,6 @@ private Q_SLOTS:
|
|||
|
||||
void TabBoxTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "abstract_client.h"
|
||||
#include "screenlockerwatcher.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
|
@ -392,7 +392,7 @@ void render(Surface *surface, const QImage &img)
|
|||
surface->commit(Surface::CommitFlag::None);
|
||||
}
|
||||
|
||||
XdgShellClient *waitForWaylandWindowShown(int timeout)
|
||||
AbstractClient *waitForWaylandWindowShown(int timeout)
|
||||
{
|
||||
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
|
||||
if (!clientAddedSpy.isValid()) {
|
||||
|
@ -401,10 +401,10 @@ XdgShellClient *waitForWaylandWindowShown(int timeout)
|
|||
if (!clientAddedSpy.wait(timeout)) {
|
||||
return nullptr;
|
||||
}
|
||||
return clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
return clientAddedSpy.first().first().value<AbstractClient *>();
|
||||
}
|
||||
|
||||
XdgShellClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format, int timeout)
|
||||
AbstractClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format, int timeout)
|
||||
{
|
||||
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
|
||||
if (!clientAddedSpy.isValid()) {
|
||||
|
@ -415,7 +415,7 @@ XdgShellClient *renderAndWaitForShown(Surface *surface, const QSize &size, const
|
|||
if (!clientAddedSpy.wait(timeout)) {
|
||||
return nullptr;
|
||||
}
|
||||
return clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
return clientAddedSpy.first().first().value<AbstractClient *>();
|
||||
}
|
||||
|
||||
void flushWaylandConnection()
|
||||
|
|
|
@ -18,9 +18,9 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "platform.h"
|
||||
#include "cursor.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -57,7 +57,6 @@ private:
|
|||
|
||||
void TouchInputTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -63,7 +62,6 @@ private Q_SLOTS:
|
|||
|
||||
void TransientPlacementTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -340,7 +338,7 @@ void TransientPlacementTest::testXdgPopupWithPanel()
|
|||
parent->setFullScreen(true);
|
||||
QVERIFY(fullscreenSpy.wait());
|
||||
parentShellSurface->ackConfigure(fullscreenSpy.first().at(2).value<quint32>());
|
||||
QSignalSpy frameGeometryChangedSpy{parent, &XdgShellClient::frameGeometryChanged};
|
||||
QSignalSpy frameGeometryChangedSpy{parent, &AbstractClient::frameGeometryChanged};
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
Test::render(parentSurface, fullscreenSpy.first().at(0).toSize(), Qt::red);
|
||||
QVERIFY(frameGeometryChangedSpy.wait());
|
||||
|
|
|
@ -18,10 +18,10 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "main.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "virtualdesktops.h"
|
||||
|
||||
|
@ -51,7 +51,6 @@ private Q_SLOTS:
|
|||
|
||||
void VirtualDesktopTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -157,7 +156,7 @@ void VirtualDesktopTest::testLastDesktopRemoved()
|
|||
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->desktop(), 2);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &AbstractClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->desktops().count(), 1u);
|
||||
|
@ -201,7 +200,7 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops()
|
|||
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->desktop(), 3u);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &AbstractClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->desktops().count(), 1u);
|
||||
|
@ -289,7 +288,7 @@ void VirtualDesktopTest::testRemoveDesktopWithWindow()
|
|||
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->desktop(), 3u);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &AbstractClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->desktops().count(), 1u);
|
||||
|
|
|
@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "rules.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <netwm.h>
|
||||
#include <xcb/xcb_icccm.h>
|
||||
|
@ -52,7 +51,6 @@ private Q_SLOTS:
|
|||
|
||||
void WindowRuleTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "keyboard_input.h"
|
||||
#include "platform.h"
|
||||
#include "pointer_input.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -63,7 +63,6 @@ private Q_SLOTS:
|
|||
|
||||
void TestWindowSelection::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "deleted.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -66,7 +65,6 @@ private Q_SLOTS:
|
|||
void X11ClientTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -21,11 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "kwin_wayland_test.h"
|
||||
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "rules.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -224,7 +224,6 @@ private Q_SLOTS:
|
|||
|
||||
void TestXdgShellClientRules::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -270,7 +269,7 @@ void TestXdgShellClientRules::name##_data() \
|
|||
QTest::newRow("XdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; \
|
||||
}
|
||||
|
||||
std::tuple<XdgShellClient *, Surface *, XdgShellSurface *> createWindow(Test::XdgShellSurfaceType type, const QByteArray &appId)
|
||||
std::tuple<AbstractClient *, Surface *, XdgShellSurface *> createWindow(Test::XdgShellSurfaceType type, const QByteArray &appId)
|
||||
{
|
||||
// Create an xdg surface.
|
||||
Surface *surface = Test::createSurface();
|
||||
|
@ -286,7 +285,7 @@ std::tuple<XdgShellClient *, Surface *, XdgShellSurface *> createWindow(Test::Xd
|
|||
|
||||
// Draw content of the surface.
|
||||
shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
|
||||
return {client, surface, shellSurface};
|
||||
}
|
||||
|
@ -310,7 +309,7 @@ void TestXdgShellClientRules::testPositionDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -348,7 +347,7 @@ void TestXdgShellClientRules::testPositionApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -427,7 +426,7 @@ void TestXdgShellClientRules::testPositionRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -506,7 +505,7 @@ void TestXdgShellClientRules::testPositionForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -553,7 +552,7 @@ void TestXdgShellClientRules::testPositionApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
QObject *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -647,7 +646,7 @@ void TestXdgShellClientRules::testPositionForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -723,7 +722,7 @@ void TestXdgShellClientRules::testSizeDontAffect()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isResizable());
|
||||
|
@ -778,7 +777,7 @@ void TestXdgShellClientRules::testSizeApply()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isResizable());
|
||||
|
@ -916,7 +915,7 @@ void TestXdgShellClientRules::testSizeRemember()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isResizable());
|
||||
|
@ -1050,7 +1049,7 @@ void TestXdgShellClientRules::testSizeForce()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(!client->isResizable());
|
||||
|
@ -1125,7 +1124,7 @@ void TestXdgShellClientRules::testSizeApplyNow()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isResizable());
|
||||
|
@ -1207,7 +1206,7 @@ void TestXdgShellClientRules::testSizeForceTemporarily()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(!client->isResizable());
|
||||
|
@ -1301,7 +1300,7 @@ void TestXdgShellClientRules::testMaximizeDontAffect()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isMaximizable());
|
||||
|
@ -1363,7 +1362,7 @@ void TestXdgShellClientRules::testMaximizeApply()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isMaximizable());
|
||||
|
@ -1475,7 +1474,7 @@ void TestXdgShellClientRules::testMaximizeRemember()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isMaximizable());
|
||||
|
@ -1587,7 +1586,7 @@ void TestXdgShellClientRules::testMaximizeForce()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(!client->isMaximizable());
|
||||
|
@ -1674,7 +1673,7 @@ void TestXdgShellClientRules::testMaximizeApplyNow()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(client->isMaximizable());
|
||||
|
@ -1796,7 +1795,7 @@ void TestXdgShellClientRules::testMaximizeForceTemporarily()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value<quint32>());
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QVERIFY(!client->isMaximizable());
|
||||
|
@ -1882,7 +1881,7 @@ void TestXdgShellClientRules::testDesktopDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -1923,7 +1922,7 @@ void TestXdgShellClientRules::testDesktopApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -1980,7 +1979,7 @@ void TestXdgShellClientRules::testDesktopRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2033,7 +2032,7 @@ void TestXdgShellClientRules::testDesktopForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2077,7 +2076,7 @@ void TestXdgShellClientRules::testDesktopApplyNow()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2143,7 +2142,7 @@ void TestXdgShellClientRules::testDesktopForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2202,7 +2201,7 @@ void TestXdgShellClientRules::testMinimizeDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2237,7 +2236,7 @@ void TestXdgShellClientRules::testMinimizeApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2285,7 +2284,7 @@ void TestXdgShellClientRules::testMinimizeRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2331,7 +2330,7 @@ void TestXdgShellClientRules::testMinimizeForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2366,7 +2365,7 @@ void TestXdgShellClientRules::testMinimizeApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2425,7 +2424,7 @@ void TestXdgShellClientRules::testMinimizeForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2473,7 +2472,7 @@ void TestXdgShellClientRules::testSkipTaskbarDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2507,7 +2506,7 @@ void TestXdgShellClientRules::testSkipTaskbarApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2553,7 +2552,7 @@ void TestXdgShellClientRules::testSkipTaskbarRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2601,7 +2600,7 @@ void TestXdgShellClientRules::testSkipTaskbarForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2636,7 +2635,7 @@ void TestXdgShellClientRules::testSkipTaskbarApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2692,7 +2691,7 @@ void TestXdgShellClientRules::testSkipTaskbarForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2742,7 +2741,7 @@ void TestXdgShellClientRules::testSkipPagerDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2776,7 +2775,7 @@ void TestXdgShellClientRules::testSkipPagerApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2822,7 +2821,7 @@ void TestXdgShellClientRules::testSkipPagerRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2870,7 +2869,7 @@ void TestXdgShellClientRules::testSkipPagerForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2905,7 +2904,7 @@ void TestXdgShellClientRules::testSkipPagerApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -2961,7 +2960,7 @@ void TestXdgShellClientRules::testSkipPagerForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3011,7 +3010,7 @@ void TestXdgShellClientRules::testSkipSwitcherDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3045,7 +3044,7 @@ void TestXdgShellClientRules::testSkipSwitcherApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3091,7 +3090,7 @@ void TestXdgShellClientRules::testSkipSwitcherRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3139,7 +3138,7 @@ void TestXdgShellClientRules::testSkipSwitcherForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3174,7 +3173,7 @@ void TestXdgShellClientRules::testSkipSwitcherApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3230,7 +3229,7 @@ void TestXdgShellClientRules::testSkipSwitcherForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3280,7 +3279,7 @@ void TestXdgShellClientRules::testKeepAboveDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3314,7 +3313,7 @@ void TestXdgShellClientRules::testKeepAboveApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3360,7 +3359,7 @@ void TestXdgShellClientRules::testKeepAboveRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3406,7 +3405,7 @@ void TestXdgShellClientRules::testKeepAboveForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3439,7 +3438,7 @@ void TestXdgShellClientRules::testKeepAboveApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3495,7 +3494,7 @@ void TestXdgShellClientRules::testKeepAboveForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3547,7 +3546,7 @@ void TestXdgShellClientRules::testKeepBelowDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3581,7 +3580,7 @@ void TestXdgShellClientRules::testKeepBelowApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3627,7 +3626,7 @@ void TestXdgShellClientRules::testKeepBelowRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3673,7 +3672,7 @@ void TestXdgShellClientRules::testKeepBelowForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3706,7 +3705,7 @@ void TestXdgShellClientRules::testKeepBelowApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3762,7 +3761,7 @@ void TestXdgShellClientRules::testKeepBelowForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3814,7 +3813,7 @@ void TestXdgShellClientRules::testShortcutDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3861,7 +3860,7 @@ void TestXdgShellClientRules::testShortcutApply()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -3946,7 +3945,7 @@ void TestXdgShellClientRules::testShortcutRemember()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4019,7 +4018,7 @@ void TestXdgShellClientRules::testShortcutForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4077,7 +4076,7 @@ void TestXdgShellClientRules::testShortcutApplyNow()
|
|||
{
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4158,7 +4157,7 @@ void TestXdgShellClientRules::testShortcutForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4287,7 +4286,7 @@ void TestXdgShellClientRules::testActiveOpacityDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4322,7 +4321,7 @@ void TestXdgShellClientRules::testActiveOpacityForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4355,7 +4354,7 @@ void TestXdgShellClientRules::testActiveOpacityForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4397,7 +4396,7 @@ void TestXdgShellClientRules::testInactiveOpacityDontAffect()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4436,7 +4435,7 @@ void TestXdgShellClientRules::testInactiveOpacityForce()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
@ -4476,7 +4475,7 @@ void TestXdgShellClientRules::testInactiveOpacityForceTemporarily()
|
|||
|
||||
// Create the test client.
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
XdgShellClient *client;
|
||||
AbstractClient *client;
|
||||
Surface *surface;
|
||||
XdgShellSurface *shellSurface;
|
||||
std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo");
|
||||
|
|
|
@ -19,13 +19,13 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "cursor.h"
|
||||
#include "decorations/decorationbridge.h"
|
||||
#include "decorations/settings.h"
|
||||
#include "effects.h"
|
||||
#include "deleted.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -126,7 +126,6 @@ private Q_SLOTS:
|
|||
void TestXdgShellClient::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWayland::Client::Output*>();
|
||||
|
||||
|
@ -186,7 +185,7 @@ void TestXdgShellClient::testMapUnmapMap()
|
|||
|
||||
QVERIFY(clientAddedSpy.isEmpty());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto client = clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
auto client = clientAddedSpy.first().first().value<AbstractClient *>();
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isShown(true));
|
||||
QCOMPARE(client->isHiddenInternal(), false);
|
||||
|
@ -212,12 +211,12 @@ void TestXdgShellClient::testMapUnmapMap()
|
|||
QUuid deletedUuid;
|
||||
QCOMPARE(deletedUuid.isNull(), true);
|
||||
|
||||
connect(client, &XdgShellClient::windowClosed, this, [&deletedUuid] (Toplevel *, Deleted *d) { deletedUuid = d->internalId(); });
|
||||
connect(client, &AbstractClient::windowClosed, this, [&deletedUuid] (Toplevel *, Deleted *d) { deletedUuid = d->internalId(); });
|
||||
|
||||
// now unmap
|
||||
QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(client, &AbstractClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &AbstractClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
@ -229,7 +228,7 @@ void TestXdgShellClient::testMapUnmapMap()
|
|||
QCOMPARE(effectsWindowHiddenSpy.count(), 1);
|
||||
QCOMPARE(effectsWindowHiddenSpy.first().first().value<EffectWindow*>(), client->effectWindow());
|
||||
|
||||
QSignalSpy windowShownSpy(client, &XdgShellClient::windowShown);
|
||||
QSignalSpy windowShownSpy(client, &AbstractClient::windowShown);
|
||||
QVERIFY(windowShownSpy.isValid());
|
||||
Test::render(surface.data(), QSize(100, 50), Qt::blue, QImage::Format_RGB32);
|
||||
QCOMPARE(clientAddedSpy.count(), 1);
|
||||
|
@ -274,7 +273,7 @@ void TestXdgShellClient::testDesktopPresenceChanged()
|
|||
QVERIFY(c);
|
||||
QCOMPARE(c->desktop(), 1);
|
||||
effects->setNumberOfDesktops(4);
|
||||
QSignalSpy desktopPresenceChangedClientSpy(c, &XdgShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedClientSpy(c, &AbstractClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedClientSpy.isValid());
|
||||
QSignalSpy desktopPresenceChangedWorkspaceSpy(workspace(), &Workspace::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedWorkspaceSpy.isValid());
|
||||
|
@ -318,7 +317,7 @@ void TestXdgShellClient::testTransientPositionAfterRemap()
|
|||
QCOMPARE(transient->frameGeometry(), QRect(c->frameGeometry().topLeft() + QPoint(5, 10), QSize(50, 40)));
|
||||
|
||||
// unmap the transient
|
||||
QSignalSpy windowHiddenSpy(transient, &XdgShellClient::windowHidden);
|
||||
QSignalSpy windowHiddenSpy(transient, &AbstractClient::windowHidden);
|
||||
QVERIFY(windowHiddenSpy.isValid());
|
||||
transientSurface->attachBuffer(Buffer::Ptr());
|
||||
transientSurface->commit(Surface::CommitFlag::None);
|
||||
|
@ -328,7 +327,7 @@ void TestXdgShellClient::testTransientPositionAfterRemap()
|
|||
c->setFrameGeometry(c->frameGeometry().translated(5, 10));
|
||||
|
||||
// now map the transient again
|
||||
QSignalSpy windowShownSpy(transient, &XdgShellClient::windowShown);
|
||||
QSignalSpy windowShownSpy(transient, &AbstractClient::windowShown);
|
||||
QVERIFY(windowShownSpy.isValid());
|
||||
Test::render(transientSurface.data(), QSize(50, 40), Qt::blue);
|
||||
QVERIFY(windowShownSpy.wait());
|
||||
|
@ -459,9 +458,9 @@ void TestXdgShellClient::testFullscreen()
|
|||
QCOMPARE(c->clientSize(), QSize(100, 50));
|
||||
QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server);
|
||||
QCOMPARE(c->clientSizeToFrameSize(c->clientSize()), c->frameGeometry().size());
|
||||
QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged);
|
||||
QSignalSpy fullscreenChangedSpy(c, &AbstractClient::fullScreenChanged);
|
||||
QVERIFY(fullscreenChangedSpy.isValid());
|
||||
QSignalSpy frameGeometryChangedSpy(c, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(c, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), &XdgShellSurface::sizeChanged);
|
||||
QVERIFY(sizeChangeRequestedSpy.isValid());
|
||||
|
@ -535,9 +534,9 @@ void TestXdgShellClient::testFullscreenRestore()
|
|||
|
||||
configureRequestedSpy.wait(100);
|
||||
|
||||
QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged);
|
||||
QSignalSpy fullscreenChangedSpy(c, &AbstractClient::fullScreenChanged);
|
||||
QVERIFY(fullscreenChangedSpy.isValid());
|
||||
QSignalSpy frameGeometryChangedSpy(c, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(c, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
|
||||
// swap back to normal
|
||||
|
@ -678,9 +677,9 @@ void TestXdgShellClient::testMaximizedToFullscreen()
|
|||
QVERIFY(!c->isFullScreen());
|
||||
QCOMPARE(c->clientSize(), QSize(100, 50));
|
||||
QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server);
|
||||
QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged);
|
||||
QSignalSpy fullscreenChangedSpy(c, &AbstractClient::fullScreenChanged);
|
||||
QVERIFY(fullscreenChangedSpy.isValid());
|
||||
QSignalSpy frameGeometryChangedSpy(c, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(c, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), &XdgShellSurface::sizeChanged);
|
||||
QVERIFY(sizeChangeRequestedSpy.isValid());
|
||||
|
@ -826,7 +825,7 @@ void TestXdgShellClient::testDesktopFileName()
|
|||
|
||||
QSignalSpy desktopFileNameChangedSpy(c, &AbstractClient::desktopFileNameChanged);
|
||||
QVERIFY(desktopFileNameChangedSpy.isValid());
|
||||
QSignalSpy iconChangedSpy(c, &XdgShellClient::iconChanged);
|
||||
QSignalSpy iconChangedSpy(c, &AbstractClient::iconChanged);
|
||||
QVERIFY(iconChangedSpy.isValid());
|
||||
shellSurface->setAppId(QByteArrayLiteral("org.kde.bar"));
|
||||
QVERIFY(desktopFileNameChangedSpy.wait());
|
||||
|
@ -897,7 +896,7 @@ void TestXdgShellClient::testCaptionMultipleWindows()
|
|||
QCOMPARE(c4->caption(), QStringLiteral("bar"));
|
||||
QCOMPARE(c4->captionNormal(), QStringLiteral("bar"));
|
||||
QCOMPARE(c4->captionSuffix(), QString());
|
||||
QSignalSpy captionChangedSpy(c4, &XdgShellClient::captionChanged);
|
||||
QSignalSpy captionChangedSpy(c4, &AbstractClient::captionChanged);
|
||||
QVERIFY(captionChangedSpy.isValid());
|
||||
shellSurface4->setTitle(QStringLiteral("foo"));
|
||||
QVERIFY(captionChangedSpy.wait());
|
||||
|
@ -1022,7 +1021,7 @@ void TestXdgShellClient::testAppMenu()
|
|||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QScopedPointer<AppMenu> menu(Test::waylandAppMenuManager()->create(surface.data()));
|
||||
QSignalSpy spy(c, &XdgShellClient::hasApplicationMenuChanged);
|
||||
QSignalSpy spy(c, &AbstractClient::hasApplicationMenuChanged);
|
||||
menu->setAddress("service.name", "object/path");
|
||||
spy.wait();
|
||||
QCOMPARE(c->hasApplicationMenu(), true);
|
||||
|
@ -1311,7 +1310,7 @@ void TestXdgShellClient::testXdgWindowGeometryIsntSet()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(200, 100));
|
||||
|
@ -1349,7 +1348,7 @@ void TestXdgShellClient::testXdgWindowGeometryAttachBuffer()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(200, 100));
|
||||
|
@ -1396,14 +1395,14 @@ void TestXdgShellClient::testXdgWindowGeometryAttachSubSurface()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
QCOMPARE(client->frameGeometry().size(), QSize(200, 100));
|
||||
|
||||
const QPoint oldPosition = client->pos();
|
||||
|
||||
QSignalSpy frameGeometryChangedSpy(client, &XdgShellClient::frameGeometryChanged);
|
||||
QSignalSpy frameGeometryChangedSpy(client, &AbstractClient::frameGeometryChanged);
|
||||
QVERIFY(frameGeometryChangedSpy.isValid());
|
||||
shellSurface->setWindowGeometry(QRect(10, 10, 180, 80));
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
@ -1440,7 +1439,7 @@ void TestXdgShellClient::testXdgWindowGeometryInteractiveResize()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
|
@ -1535,7 +1534,7 @@ void TestXdgShellClient::testXdgWindowGeometryFullScreen()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
|
@ -1591,7 +1590,7 @@ void TestXdgShellClient::testXdgWindowGeometryMaximize()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
AbstractClient *client = Test::renderAndWaitForShown(surface.data(), QSize(200, 100), Qt::red);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QCOMPARE(client->bufferGeometry().size(), QSize(200, 100));
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
|
||||
|
@ -52,7 +51,6 @@ private Q_SLOTS:
|
|||
|
||||
void XWaylandInputTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "abstract_client.h"
|
||||
#include "platform.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -52,7 +52,6 @@ private:
|
|||
void XwaylandSelectionsTest::initTestCase()
|
||||
{
|
||||
QSKIP("Skipped as it fails for unknown reasons on build.kde.org");
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<QProcess::ExitStatus>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "scene.h"
|
||||
#include "screens.h"
|
||||
#include "shadow.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "unmanaged.h"
|
||||
#include "useractions.h"
|
||||
#include "utils.h"
|
||||
|
@ -366,7 +365,7 @@ void Compositor::startupWithWorkspace()
|
|||
|
||||
if (auto *server = waylandServer()) {
|
||||
const auto clients = server->clients();
|
||||
for (XdgShellClient *c : clients) {
|
||||
for (AbstractClient *c : clients) {
|
||||
c->setupCompositing();
|
||||
c->updateShadow();
|
||||
}
|
||||
|
@ -441,10 +440,10 @@ void Compositor::stop()
|
|||
}
|
||||
|
||||
if (waylandServer()) {
|
||||
for (XdgShellClient *c : waylandServer()->clients()) {
|
||||
for (AbstractClient *c : waylandServer()->clients()) {
|
||||
m_scene->removeToplevel(c);
|
||||
}
|
||||
for (XdgShellClient *c : waylandServer()->clients()) {
|
||||
for (AbstractClient *c : waylandServer()->clients()) {
|
||||
c->finishCompositing();
|
||||
}
|
||||
}
|
||||
|
@ -749,7 +748,7 @@ bool Compositor::windowRepaintsPending() const
|
|||
}
|
||||
if (auto *server = waylandServer()) {
|
||||
const auto &clients = server->clients();
|
||||
auto test = [](XdgShellClient *c) {
|
||||
auto test = [](AbstractClient *c) {
|
||||
return c->readyForPainting() && !c->repaints().isEmpty();
|
||||
};
|
||||
if (std::any_of(clients.begin(), clients.end(), test)) {
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "internal_client.h"
|
||||
#include "main.h"
|
||||
#include "scene.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "unmanaged.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -876,17 +875,17 @@ DebugConsoleModel::DebugConsoleModel(QObject *parent)
|
|||
if (waylandServer()) {
|
||||
const auto clients = waylandServer()->clients();
|
||||
for (auto c : clients) {
|
||||
m_shellClients.append(c);
|
||||
m_waylandClients.append(c);
|
||||
}
|
||||
// TODO: that only includes windows getting shown, not those which are only created
|
||||
connect(waylandServer(), &WaylandServer::shellClientAdded, this,
|
||||
[this] (XdgShellClient *c) {
|
||||
add(s_waylandClientId -1, m_shellClients, c);
|
||||
[this] (AbstractClient *c) {
|
||||
add(s_waylandClientId -1, m_waylandClients, c);
|
||||
}
|
||||
);
|
||||
connect(waylandServer(), &WaylandServer::shellClientRemoved, this,
|
||||
[this] (XdgShellClient *c) {
|
||||
remove(s_waylandClientId -1, m_shellClients, c);
|
||||
[this] (AbstractClient *c) {
|
||||
remove(s_waylandClientId -1, m_waylandClients, c);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -976,7 +975,7 @@ int DebugConsoleModel::rowCount(const QModelIndex &parent) const
|
|||
case s_x11UnmanagedId:
|
||||
return m_unmanageds.count();
|
||||
case s_waylandClientId:
|
||||
return m_shellClients.count();
|
||||
return m_waylandClients.count();
|
||||
case s_workspaceInternalId:
|
||||
return m_internalClients.count();
|
||||
default:
|
||||
|
@ -993,7 +992,7 @@ int DebugConsoleModel::rowCount(const QModelIndex &parent) const
|
|||
} else if (parent.internalId() < s_idDistance * (s_x11UnmanagedId + 1)) {
|
||||
return propertyCount(parent, &DebugConsoleModel::unmanaged);
|
||||
} else if (parent.internalId() < s_idDistance * (s_waylandClientId + 1)) {
|
||||
return propertyCount(parent, &DebugConsoleModel::shellClient);
|
||||
return propertyCount(parent, &DebugConsoleModel::waylandClient);
|
||||
} else if (parent.internalId() < s_idDistance * (s_workspaceInternalId + 1)) {
|
||||
return propertyCount(parent, &DebugConsoleModel::internalClient);
|
||||
}
|
||||
|
@ -1045,7 +1044,7 @@ QModelIndex DebugConsoleModel::index(int row, int column, const QModelIndex &par
|
|||
case s_x11UnmanagedId:
|
||||
return indexForClient(row, column, m_unmanageds, s_x11UnmanagedId);
|
||||
case s_waylandClientId:
|
||||
return indexForClient(row, column, m_shellClients, s_waylandClientId);
|
||||
return indexForClient(row, column, m_waylandClients, s_waylandClientId);
|
||||
case s_workspaceInternalId:
|
||||
return indexForClient(row, column, m_internalClients, s_workspaceInternalId);
|
||||
default:
|
||||
|
@ -1058,7 +1057,7 @@ QModelIndex DebugConsoleModel::index(int row, int column, const QModelIndex &par
|
|||
} else if (parent.internalId() < s_idDistance * (s_x11UnmanagedId + 1)) {
|
||||
return indexForProperty(row, column, parent, &DebugConsoleModel::unmanaged);
|
||||
} else if (parent.internalId() < s_idDistance * (s_waylandClientId + 1)) {
|
||||
return indexForProperty(row, column, parent, &DebugConsoleModel::shellClient);
|
||||
return indexForProperty(row, column, parent, &DebugConsoleModel::waylandClient);
|
||||
} else if (parent.internalId() < s_idDistance * (s_workspaceInternalId + 1)) {
|
||||
return indexForProperty(row, column, parent, &DebugConsoleModel::internalClient);
|
||||
}
|
||||
|
@ -1195,7 +1194,7 @@ QVariant DebugConsoleModel::data(const QModelIndex &index, int role) const
|
|||
if (index.column() >= 2 || role != Qt::DisplayRole) {
|
||||
return QVariant();
|
||||
}
|
||||
if (XdgShellClient *c = shellClient(index)) {
|
||||
if (AbstractClient *c = waylandClient(index)) {
|
||||
return propertyData(c, index, role);
|
||||
} else if (InternalClient *c = internalClient(index)) {
|
||||
return propertyData(c, index, role);
|
||||
|
@ -1222,7 +1221,7 @@ QVariant DebugConsoleModel::data(const QModelIndex &index, int role) const
|
|||
break;
|
||||
}
|
||||
case s_waylandClientId:
|
||||
return clientData(index, role, m_shellClients);
|
||||
return clientData(index, role, m_waylandClients);
|
||||
case s_workspaceInternalId:
|
||||
return clientData(index, role, m_internalClients);
|
||||
default:
|
||||
|
@ -1243,9 +1242,9 @@ static T *clientForIndex(const QModelIndex &index, const QVector<T*> &clients, i
|
|||
return clients.at(row);
|
||||
}
|
||||
|
||||
XdgShellClient *DebugConsoleModel::shellClient(const QModelIndex &index) const
|
||||
AbstractClient *DebugConsoleModel::waylandClient(const QModelIndex &index) const
|
||||
{
|
||||
return clientForIndex(index, m_shellClients, s_waylandClientId);
|
||||
return clientForIndex(index, m_waylandClients, s_waylandClientId);
|
||||
}
|
||||
|
||||
InternalClient *DebugConsoleModel::internalClient(const QModelIndex &index) const
|
||||
|
@ -1295,7 +1294,7 @@ SurfaceTreeModel::SurfaceTreeModel(QObject *parent)
|
|||
}
|
||||
if (waylandServer()) {
|
||||
connect(waylandServer(), &WaylandServer::shellClientAdded, this,
|
||||
[this, reset] (XdgShellClient *c) {
|
||||
[this, reset] (AbstractClient *c) {
|
||||
connect(c->surface(), &SurfaceInterface::subSurfaceTreeChanged, this, reset);
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -39,9 +39,9 @@ class DebugConsole;
|
|||
namespace KWin
|
||||
{
|
||||
|
||||
class AbstractClient;
|
||||
class X11Client;
|
||||
class InternalClient;
|
||||
class XdgShellClient;
|
||||
class Unmanaged;
|
||||
class DebugConsoleFilter;
|
||||
|
||||
|
@ -73,13 +73,13 @@ private:
|
|||
void add(int parentRow, QVector<T*> &clients, T *client);
|
||||
template <class T>
|
||||
void remove(int parentRow, QVector<T*> &clients, T *client);
|
||||
XdgShellClient *shellClient(const QModelIndex &index) const;
|
||||
AbstractClient *waylandClient(const QModelIndex &index) const;
|
||||
InternalClient *internalClient(const QModelIndex &index) const;
|
||||
X11Client *x11Client(const QModelIndex &index) const;
|
||||
Unmanaged *unmanaged(const QModelIndex &index) const;
|
||||
int topLevelRowCount() const;
|
||||
|
||||
QVector<XdgShellClient *> m_shellClients;
|
||||
QVector<AbstractClient *> m_waylandClients;
|
||||
QVector<InternalClient*> m_internalClients;
|
||||
QVector<X11Client *> m_x11Clients;
|
||||
QVector<Unmanaged*> m_unmanageds;
|
||||
|
|
30
effects.cpp
30
effects.cpp
|
@ -258,20 +258,18 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
|||
setupAbstractClientConnections(client);
|
||||
}
|
||||
if (auto w = waylandServer()) {
|
||||
connect(w, &WaylandServer::shellClientAdded, this,
|
||||
[this](XdgShellClient *c) {
|
||||
if (c->readyForPainting())
|
||||
slotXdgShellClientShown(c);
|
||||
else
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotXdgShellClientShown);
|
||||
}
|
||||
);
|
||||
connect(w, &WaylandServer::shellClientAdded, this, [this](AbstractClient *c) {
|
||||
if (c->readyForPainting())
|
||||
slotWaylandClientShown(c);
|
||||
else
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotWaylandClientShown);
|
||||
});
|
||||
const auto clients = waylandServer()->clients();
|
||||
for (XdgShellClient *c : clients) {
|
||||
for (AbstractClient *c : clients) {
|
||||
if (c->readyForPainting()) {
|
||||
setupAbstractClientConnections(c);
|
||||
} else {
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotXdgShellClientShown);
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotWaylandClientShown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -578,11 +576,11 @@ void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
|||
emit windowAdded(c->effectWindow());
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::slotXdgShellClientShown(Toplevel *t)
|
||||
void EffectsHandlerImpl::slotWaylandClientShown(Toplevel *toplevel)
|
||||
{
|
||||
XdgShellClient *c = static_cast<XdgShellClient *>(t);
|
||||
setupAbstractClientConnections(c);
|
||||
emit windowAdded(t->effectWindow());
|
||||
AbstractClient *client = static_cast<AbstractClient *>(toplevel);
|
||||
setupAbstractClientConnections(client);
|
||||
emit windowAdded(toplevel->effectWindow());
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
|
||||
|
@ -1090,7 +1088,7 @@ EffectWindow* EffectsHandlerImpl::findWindow(WId id) const
|
|||
if (Unmanaged* w = Workspace::self()->findUnmanaged(id))
|
||||
return w->effectWindow();
|
||||
if (waylandServer()) {
|
||||
if (XdgShellClient *w = waylandServer()->findClient(id)) {
|
||||
if (AbstractClient *w = waylandServer()->findClient(id)) {
|
||||
return w->effectWindow();
|
||||
}
|
||||
}
|
||||
|
@ -1100,7 +1098,7 @@ EffectWindow* EffectsHandlerImpl::findWindow(WId id) const
|
|||
EffectWindow* EffectsHandlerImpl::findWindow(KWayland::Server::SurfaceInterface *surf) const
|
||||
{
|
||||
if (waylandServer()) {
|
||||
if (XdgShellClient *w = waylandServer()->findClient(surf)) {
|
||||
if (AbstractClient *w = waylandServer()->findClient(surf)) {
|
||||
return w->effectWindow();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -296,7 +296,7 @@ public Q_SLOTS:
|
|||
|
||||
protected Q_SLOTS:
|
||||
void slotClientShown(KWin::Toplevel*);
|
||||
void slotXdgShellClientShown(KWin::Toplevel*);
|
||||
void slotWaylandClientShown(KWin::Toplevel*);
|
||||
void slotUnmanagedShown(KWin::Toplevel*);
|
||||
void slotWindowClosed(KWin::Toplevel *c, KWin::Deleted *d);
|
||||
void slotClientMaximized(KWin::AbstractClient *c, MaximizeMode maxMode);
|
||||
|
|
|
@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "idle_inhibition.h"
|
||||
#include "abstract_client.h"
|
||||
#include "deleted.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <KWayland/Server/idle_interface.h>
|
||||
|
@ -44,19 +44,19 @@ IdleInhibition::IdleInhibition(IdleInterface *idle)
|
|||
|
||||
IdleInhibition::~IdleInhibition() = default;
|
||||
|
||||
void IdleInhibition::registerXdgShellClient(XdgShellClient *client)
|
||||
void IdleInhibition::registerClient(AbstractClient *client)
|
||||
{
|
||||
auto updateInhibit = [this, client] {
|
||||
update(client);
|
||||
};
|
||||
|
||||
m_connections[client] = connect(client->surface(), &SurfaceInterface::inhibitsIdleChanged, this, updateInhibit);
|
||||
connect(client, &XdgShellClient::desktopChanged, this, updateInhibit);
|
||||
connect(client, &XdgShellClient::clientMinimized, this, updateInhibit);
|
||||
connect(client, &XdgShellClient::clientUnminimized, this, updateInhibit);
|
||||
connect(client, &XdgShellClient::windowHidden, this, updateInhibit);
|
||||
connect(client, &XdgShellClient::windowShown, this, updateInhibit);
|
||||
connect(client, &XdgShellClient::windowClosed, this,
|
||||
connect(client, &AbstractClient::desktopChanged, this, updateInhibit);
|
||||
connect(client, &AbstractClient::clientMinimized, this, updateInhibit);
|
||||
connect(client, &AbstractClient::clientUnminimized, this, updateInhibit);
|
||||
connect(client, &AbstractClient::windowHidden, this, updateInhibit);
|
||||
connect(client, &AbstractClient::windowShown, this, updateInhibit);
|
||||
connect(client, &AbstractClient::windowClosed, this,
|
||||
[this, client] {
|
||||
uninhibit(client);
|
||||
auto it = m_connections.find(client);
|
||||
|
|
|
@ -37,7 +37,6 @@ using KWayland::Server::IdleInterface;
|
|||
namespace KWin
|
||||
{
|
||||
class AbstractClient;
|
||||
class XdgShellClient;
|
||||
|
||||
class IdleInhibition : public QObject
|
||||
{
|
||||
|
@ -46,7 +45,7 @@ public:
|
|||
explicit IdleInhibition(IdleInterface *idle);
|
||||
~IdleInhibition() override;
|
||||
|
||||
void registerXdgShellClient(XdgShellClient *client);
|
||||
void registerClient(AbstractClient *client);
|
||||
|
||||
bool isInhibited() const {
|
||||
return !m_idleInhibitors.isEmpty();
|
||||
|
|
|
@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "libinput/device.h"
|
||||
#include "platform.h"
|
||||
#include "popup_input_filter.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "xwl/xwayland_interface.h"
|
||||
#include "internal_client.h"
|
||||
|
|
|
@ -93,7 +93,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "composite.h"
|
||||
#include "screenedge.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "internal_client.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ namespace KWin
|
|||
class DrmBackend;
|
||||
class DrmOutput;
|
||||
class DrmBuffer;
|
||||
class XdgShellClient;
|
||||
|
||||
/**
|
||||
* @brief OpenGL Backend using Egl with an EGLDevice.
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "input_event_spy.h"
|
||||
#include "osd.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_cursor_theme.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
*
|
||||
*/
|
||||
#include "popup_input_filter.h"
|
||||
#include "abstract_client.h"
|
||||
#include "deleted.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace KWin
|
||||
{
|
||||
class Toplevel;
|
||||
class XdgShellClient;
|
||||
|
||||
class PopupInputFilter : public QObject, public InputEventFilter
|
||||
{
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "x11client.h"
|
||||
#include "screens.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
namespace KWin {
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "composite.h"
|
||||
#include "effects.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
|
|
|
@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "scripting/scripting.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xkb.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screenlockerwatcher.h"
|
||||
|
||||
#include <KWayland/Server/display.h>
|
||||
|
@ -156,7 +155,7 @@ void VirtualKeyboard::init()
|
|||
}
|
||||
);
|
||||
|
||||
auto newClient = waylandServer()->findAbstractClient(waylandServer()->seat()->focusedTextInputSurface());
|
||||
auto newClient = waylandServer()->findClient(waylandServer()->seat()->focusedTextInputSurface());
|
||||
// Reset the old client virtual keybaord geom if necessary
|
||||
// Old and new clients could be the same if focus moves between subsurfaces
|
||||
if (newClient != m_trackedClient) {
|
||||
|
@ -166,7 +165,7 @@ void VirtualKeyboard::init()
|
|||
m_trackedClient = newClient;
|
||||
}
|
||||
|
||||
m_trackedClient = waylandServer()->findAbstractClient(waylandServer()->seat()->focusedTextInputSurface());
|
||||
m_trackedClient = waylandServer()->findClient(waylandServer()->seat()->focusedTextInputSurface());
|
||||
|
||||
updateInputPanelState();
|
||||
} else {
|
||||
|
|
|
@ -328,7 +328,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
|
|||
m_xdgDecorationManager = m_display->createXdgDecorationManager(m_xdgShell, m_display);
|
||||
m_xdgDecorationManager->create();
|
||||
connect(m_xdgDecorationManager, &XdgDecorationManagerInterface::xdgDecorationInterfaceCreated, this, [this] (XdgDecorationInterface *deco) {
|
||||
if (XdgShellClient *client = findClient(deco->surface()->surface())) {
|
||||
if (XdgShellClient *client = findXdgShellClient(deco->surface()->surface())) {
|
||||
client->installXdgDecoration(deco);
|
||||
}
|
||||
});
|
||||
|
@ -343,13 +343,13 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
|
|||
m_idle = m_display->createIdle(m_display);
|
||||
m_idle->create();
|
||||
auto idleInhibition = new IdleInhibition(m_idle);
|
||||
connect(this, &WaylandServer::shellClientAdded, idleInhibition, &IdleInhibition::registerXdgShellClient);
|
||||
connect(this, &WaylandServer::shellClientAdded, idleInhibition, &IdleInhibition::registerClient);
|
||||
m_display->createIdleInhibitManager(IdleInhibitManagerInterfaceVersion::UnstableV1, m_display)->create();
|
||||
m_plasmaShell = m_display->createPlasmaShell(m_display);
|
||||
m_plasmaShell->create();
|
||||
connect(m_plasmaShell, &PlasmaShellInterface::surfaceCreated,
|
||||
[this] (PlasmaShellSurfaceInterface *surface) {
|
||||
if (XdgShellClient *client = findClient(surface->surface())) {
|
||||
if (XdgShellClient *client = findXdgShellClient(surface->surface())) {
|
||||
client->installPlasmaShellSurface(surface);
|
||||
} else {
|
||||
m_plasmaShellSurfaces << surface;
|
||||
|
@ -365,7 +365,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
|
|||
m_appMenuManager->create();
|
||||
connect(m_appMenuManager, &AppMenuManagerInterface::appMenuCreated,
|
||||
[this] (AppMenuInterface *appMenu) {
|
||||
if (XdgShellClient *client = findClient(appMenu->surface())) {
|
||||
if (XdgShellClient *client = findXdgShellClient(appMenu->surface())) {
|
||||
client->installAppMenu(appMenu);
|
||||
}
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
|
|||
m_paletteManager->create();
|
||||
connect(m_paletteManager, &ServerSideDecorationPaletteManagerInterface::paletteCreated,
|
||||
[this] (ServerSideDecorationPaletteInterface *palette) {
|
||||
if (XdgShellClient *client = findClient(palette->surface())) {
|
||||
if (XdgShellClient *client = findXdgShellClient(palette->surface())) {
|
||||
client->installPalette(palette);
|
||||
}
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
|
|||
m_decorationManager = m_display->createServerSideDecorationManager(m_display);
|
||||
connect(m_decorationManager, &ServerSideDecorationManagerInterface::decorationCreated, this,
|
||||
[this] (ServerSideDecorationInterface *deco) {
|
||||
if (XdgShellClient *c = findClient(deco->surface())) {
|
||||
if (XdgShellClient *c = findXdgShellClient(deco->surface())) {
|
||||
c->installServerSideDecoration(deco);
|
||||
}
|
||||
connect(deco, &ServerSideDecorationInterface::modeRequested, this,
|
||||
|
@ -639,7 +639,7 @@ void WaylandServer::createInternalConnection()
|
|||
m_internalConnection.client->initConnection();
|
||||
}
|
||||
|
||||
void WaylandServer::removeClient(XdgShellClient *c)
|
||||
void WaylandServer::removeClient(AbstractClient *c)
|
||||
{
|
||||
m_clients.removeAll(c);
|
||||
emit shellClientRemoved(c);
|
||||
|
@ -656,10 +656,10 @@ void WaylandServer::dispatch()
|
|||
m_display->dispatchEvents(0);
|
||||
}
|
||||
|
||||
static XdgShellClient *findClientInList(const QList<XdgShellClient *> &clients, quint32 id)
|
||||
static AbstractClient *findClientInList(const QList<AbstractClient *> &clients, quint32 id)
|
||||
{
|
||||
auto it = std::find_if(clients.begin(), clients.end(),
|
||||
[id] (XdgShellClient *c) {
|
||||
[id] (AbstractClient *c) {
|
||||
return c->windowId() == id;
|
||||
}
|
||||
);
|
||||
|
@ -669,10 +669,10 @@ static XdgShellClient *findClientInList(const QList<XdgShellClient *> &clients,
|
|||
return *it;
|
||||
}
|
||||
|
||||
static XdgShellClient *findClientInList(const QList<XdgShellClient *> &clients, KWayland::Server::SurfaceInterface *surface)
|
||||
static AbstractClient *findClientInList(const QList<AbstractClient *> &clients, KWayland::Server::SurfaceInterface *surface)
|
||||
{
|
||||
auto it = std::find_if(clients.begin(), clients.end(),
|
||||
[surface] (XdgShellClient *c) {
|
||||
[surface] (AbstractClient *c) {
|
||||
return c->surface() == surface;
|
||||
}
|
||||
);
|
||||
|
@ -682,31 +682,31 @@ static XdgShellClient *findClientInList(const QList<XdgShellClient *> &clients,
|
|||
return *it;
|
||||
}
|
||||
|
||||
XdgShellClient *WaylandServer::findClient(quint32 id) const
|
||||
AbstractClient *WaylandServer::findClient(quint32 id) const
|
||||
{
|
||||
if (id == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
if (XdgShellClient *c = findClientInList(m_clients, id)) {
|
||||
if (AbstractClient *c = findClientInList(m_clients, id)) {
|
||||
return c;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
XdgShellClient *WaylandServer::findClient(SurfaceInterface *surface) const
|
||||
AbstractClient *WaylandServer::findClient(SurfaceInterface *surface) const
|
||||
{
|
||||
if (!surface) {
|
||||
return nullptr;
|
||||
}
|
||||
if (XdgShellClient *c = findClientInList(m_clients, surface)) {
|
||||
if (AbstractClient *c = findClientInList(m_clients, surface)) {
|
||||
return c;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AbstractClient *WaylandServer::findAbstractClient(SurfaceInterface *surface) const
|
||||
XdgShellClient *WaylandServer::findXdgShellClient(SurfaceInterface *surface) const
|
||||
{
|
||||
return findClient(surface);
|
||||
return qobject_cast<XdgShellClient *>(findClient(surface));
|
||||
}
|
||||
|
||||
quint32 WaylandServer::createWindowId(SurfaceInterface *surface)
|
||||
|
|
|
@ -122,13 +122,13 @@ public:
|
|||
}
|
||||
KWayland::Server::LinuxDmabufUnstableV1Interface *linuxDmabuf();
|
||||
|
||||
QList<XdgShellClient *> clients() const {
|
||||
QList<AbstractClient *> clients() const {
|
||||
return m_clients;
|
||||
}
|
||||
void removeClient(XdgShellClient *c);
|
||||
XdgShellClient *findClient(quint32 id) const;
|
||||
XdgShellClient *findClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
AbstractClient *findAbstractClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
void removeClient(AbstractClient *c);
|
||||
AbstractClient *findClient(quint32 id) const;
|
||||
AbstractClient *findClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
XdgShellClient *findXdgShellClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
|
||||
/**
|
||||
* @returns a transient parent of a surface imported with the foreign protocol, if any
|
||||
|
@ -230,8 +230,8 @@ public:
|
|||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
void shellClientAdded(KWin::XdgShellClient *);
|
||||
void shellClientRemoved(KWin::XdgShellClient *);
|
||||
void shellClientAdded(KWin::AbstractClient *);
|
||||
void shellClientRemoved(KWin::AbstractClient *);
|
||||
void terminatingInternalClientConnection();
|
||||
void initialized();
|
||||
void foreignTransientChanged(KWayland::Server::SurfaceInterface *child);
|
||||
|
@ -281,7 +281,7 @@ private:
|
|||
} m_internalConnection;
|
||||
KWayland::Server::XdgForeignInterface *m_XdgForeign = nullptr;
|
||||
KWayland::Server::KeyStateInterface *m_keyState = nullptr;
|
||||
QList<XdgShellClient *> m_clients;
|
||||
QList<AbstractClient *> m_clients;
|
||||
QHash<KWayland::Server::ClientConnection*, quint16> m_clientIds;
|
||||
InitalizationFlags m_initFlags;
|
||||
QVector<KWayland::Server::PlasmaShellSurfaceInterface*> m_plasmaShellSurfaces;
|
||||
|
|
189
workspace.cpp
189
workspace.cpp
|
@ -288,95 +288,9 @@ void Workspace::init()
|
|||
|
||||
Scripting::create(this);
|
||||
|
||||
if (auto w = waylandServer()) {
|
||||
connect(w, &WaylandServer::shellClientAdded, this,
|
||||
[this] (XdgShellClient *c) {
|
||||
setupClientConnections(c);
|
||||
c->updateDecoration(false);
|
||||
updateClientLayer(c);
|
||||
if (!c->isInternal()) {
|
||||
const QRect area = clientArea(PlacementArea, Screens::self()->current(), c->desktop());
|
||||
bool placementDone = false;
|
||||
if (c->isInitialPositionSet()) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (c->isFullScreen()) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (c->maximizeMode() == MaximizeMode::MaximizeFull) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (c->rules()->checkPosition(invalidPoint, true) != invalidPoint) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (!placementDone) {
|
||||
c->placeIn(area);
|
||||
}
|
||||
m_allClients.append(c);
|
||||
if (!unconstrained_stacking_order.contains(c))
|
||||
unconstrained_stacking_order.append(c); // Raise if it hasn't got any stacking position yet
|
||||
if (!stacking_order.contains(c)) // It'll be updated later, and updateToolWindows() requires
|
||||
stacking_order.append(c); // c to be in stacking_order
|
||||
}
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
if (c->wantsInput() && !c->isMinimized()) {
|
||||
activateClient(c);
|
||||
}
|
||||
updateTabbox();
|
||||
connect(c, &XdgShellClient::windowShown, this,
|
||||
[this, c] {
|
||||
updateClientLayer(c);
|
||||
// TODO: when else should we send the client through placement?
|
||||
if (c->hasTransientPlacementHint()) {
|
||||
const QRect area = clientArea(PlacementArea, Screens::self()->current(), c->desktop());
|
||||
c->placeIn(area);
|
||||
}
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
if (c->wantsInput()) {
|
||||
activateClient(c);
|
||||
}
|
||||
}
|
||||
);
|
||||
connect(c, &XdgShellClient::windowHidden, this,
|
||||
[this] {
|
||||
// TODO: update tabbox if it's displayed
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
connect(w, &WaylandServer::shellClientRemoved, this,
|
||||
[this] (XdgShellClient *c) {
|
||||
m_allClients.removeAll(c);
|
||||
if (c == most_recently_raised) {
|
||||
most_recently_raised = nullptr;
|
||||
}
|
||||
if (c == delayfocus_client) {
|
||||
cancelDelayFocus();
|
||||
}
|
||||
if (c == last_active_client) {
|
||||
last_active_client = nullptr;
|
||||
}
|
||||
if (client_keys_client == c) {
|
||||
setupWindowShortcutDone(false);
|
||||
}
|
||||
if (!c->shortcut().isEmpty()) {
|
||||
c->setShortcut(QString()); // Remove from client_keys
|
||||
}
|
||||
clientHidden(c);
|
||||
emit clientRemoved(c);
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
updateTabbox();
|
||||
}
|
||||
);
|
||||
if (auto server = waylandServer()) {
|
||||
connect(server, &WaylandServer::shellClientAdded, this, &Workspace::addShellClient);
|
||||
connect(server, &WaylandServer::shellClientRemoved, this, &Workspace::removeShellClient);
|
||||
}
|
||||
|
||||
// SELI TODO: This won't work with unreasonable focus policies,
|
||||
|
@ -559,9 +473,12 @@ Workspace::~Workspace()
|
|||
X11Client::cleanupX11();
|
||||
|
||||
if (waylandServer()) {
|
||||
const QList<XdgShellClient *> shellClients = waylandServer()->clients();
|
||||
for (XdgShellClient *shellClient : shellClients) {
|
||||
shellClient->destroyClient();
|
||||
// TODO: Introduce AbstractClient::destroy().
|
||||
const QList<AbstractClient *> shellClients = waylandServer()->clients();
|
||||
for (AbstractClient *client : shellClients) {
|
||||
if (XdgShellClient *shellClient = qobject_cast<XdgShellClient *>(client)) {
|
||||
shellClient->destroyClient();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -773,6 +690,92 @@ void Workspace::removeDeleted(Deleted* c)
|
|||
}
|
||||
}
|
||||
|
||||
void Workspace::addShellClient(AbstractClient *client)
|
||||
{
|
||||
setupClientConnections(client);
|
||||
client->updateDecoration(false);
|
||||
updateClientLayer(client);
|
||||
|
||||
const QRect area = clientArea(PlacementArea, Screens::self()->current(), client->desktop());
|
||||
bool placementDone = false;
|
||||
if (client->isInitialPositionSet()) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (client->isFullScreen()) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (client->maximizeMode() == MaximizeMode::MaximizeFull) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (client->rules()->checkPosition(invalidPoint, true) != invalidPoint) {
|
||||
placementDone = true;
|
||||
}
|
||||
if (!placementDone) {
|
||||
client->placeIn(area);
|
||||
}
|
||||
m_allClients.append(client);
|
||||
if (!unconstrained_stacking_order.contains(client)) {
|
||||
unconstrained_stacking_order.append(client); // Raise if it hasn't got any stacking position yet
|
||||
}
|
||||
if (!stacking_order.contains(client)) { // It'll be updated later, and updateToolWindows() requires
|
||||
stacking_order.append(client); // client to be in stacking_order
|
||||
}
|
||||
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
if (client->wantsInput() && !client->isMinimized()) {
|
||||
activateClient(client);
|
||||
}
|
||||
updateTabbox();
|
||||
connect(client, &AbstractClient::windowShown, this, [this, client] {
|
||||
updateClientLayer(client);
|
||||
// TODO: when else should we send the client through placement?
|
||||
if (client->hasTransientPlacementHint()) {
|
||||
const QRect area = clientArea(PlacementArea, Screens::self()->current(), client->desktop());
|
||||
client->placeIn(area);
|
||||
}
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
if (client->wantsInput()) {
|
||||
activateClient(client);
|
||||
}
|
||||
});
|
||||
connect(client, &AbstractClient::windowHidden, this, [this] {
|
||||
// TODO: update tabbox if it's displayed
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
});
|
||||
}
|
||||
|
||||
void Workspace::removeShellClient(AbstractClient *client)
|
||||
{
|
||||
m_allClients.removeAll(client);
|
||||
if (client == most_recently_raised) {
|
||||
most_recently_raised = nullptr;
|
||||
}
|
||||
if (client == delayfocus_client) {
|
||||
cancelDelayFocus();
|
||||
}
|
||||
if (client == last_active_client) {
|
||||
last_active_client = nullptr;
|
||||
}
|
||||
if (client_keys_client == client) {
|
||||
setupWindowShortcutDone(false);
|
||||
}
|
||||
if (!client->shortcut().isEmpty()) {
|
||||
client->setShortcut(QString()); // Remove from client_keys
|
||||
}
|
||||
clientHidden(client);
|
||||
emit clientRemoved(client);
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
updateTabbox();
|
||||
}
|
||||
|
||||
void Workspace::updateToolWindows(bool also_hide)
|
||||
{
|
||||
// TODO: What if Client's transiency/group changes? should this be called too? (I'm paranoid, am I not?)
|
||||
|
@ -2074,7 +2077,7 @@ void Workspace::updateClientArea(bool force)
|
|||
}
|
||||
}
|
||||
if (waylandServer()) {
|
||||
auto updateStrutsForWaylandClient = [&] (XdgShellClient *c) {
|
||||
auto updateStrutsForWaylandClient = [&] (AbstractClient *c) {
|
||||
// assuming that only docks have "struts" and that all docks have a strut
|
||||
if (!c->hasStrut()) {
|
||||
return;
|
||||
|
|
|
@ -565,6 +565,9 @@ private:
|
|||
Unmanaged* createUnmanaged(xcb_window_t w);
|
||||
void addUnmanaged(Unmanaged* c);
|
||||
|
||||
void addShellClient(AbstractClient *client);
|
||||
void removeShellClient(AbstractClient *client);
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
void closeActivePopup();
|
||||
|
|
|
@ -373,7 +373,7 @@ bool XdgShellClient::belongsToDesktop() const
|
|||
const auto clients = waylandServer()->clients();
|
||||
|
||||
return std::any_of(clients.constBegin(), clients.constEnd(),
|
||||
[this](const XdgShellClient *client) {
|
||||
[this](const AbstractClient *client) {
|
||||
if (belongsToSameApplication(client, SameApplicationChecks())) {
|
||||
return client->isDesktop();
|
||||
}
|
||||
|
@ -1180,7 +1180,7 @@ void XdgShellClient::handleTransientForChanged()
|
|||
if (!transientSurface) {
|
||||
transientSurface = waylandServer()->findForeignTransientForSurface(surface());
|
||||
}
|
||||
XdgShellClient *transientClient = waylandServer()->findClient(transientSurface);
|
||||
AbstractClient *transientClient = waylandServer()->findClient(transientSurface);
|
||||
if (transientClient != transientFor()) {
|
||||
// Remove from main client.
|
||||
if (transientFor()) {
|
||||
|
@ -1934,12 +1934,6 @@ void XdgShellClient::doMinimize()
|
|||
workspace()->updateMinimizedOfTransients(this);
|
||||
}
|
||||
|
||||
void XdgShellClient::placeIn(const QRect &area)
|
||||
{
|
||||
Placement::self()->place(this, area);
|
||||
setGeometryRestore(frameGeometry());
|
||||
}
|
||||
|
||||
void XdgShellClient::showOnScreenEdge()
|
||||
{
|
||||
if (!m_plasmaShellSurface || m_unmapped) {
|
||||
|
|
|
@ -128,8 +128,6 @@ public:
|
|||
void installPalette(KWayland::Server::ServerSideDecorationPaletteInterface *palette);
|
||||
void installXdgDecoration(KWayland::Server::XdgDecorationInterface *decoration);
|
||||
|
||||
void placeIn(const QRect &area);
|
||||
|
||||
protected:
|
||||
void addDamage(const QRegion &damage) override;
|
||||
bool belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const override;
|
||||
|
|
Loading…
Reference in a new issue