Rename ShellClient to XdgShellClient
Summary: Rename ShellClient to XdgShellClient in order to reflect that it represents only xdg-shell clients. Test Plan: Compiles, tests still pass. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23589
This commit is contained in:
parent
665ec0a5de
commit
168ea98845
91 changed files with 697 additions and 697 deletions
|
@ -475,7 +475,6 @@ set(kwin_KDEINIT_SRCS
|
|||
scripting/timer.cpp
|
||||
scripting/workspace_wrapper.cpp
|
||||
shadow.cpp
|
||||
shell_client.cpp
|
||||
sm.cpp
|
||||
thumbnailitem.cpp
|
||||
toplevel.cpp
|
||||
|
@ -496,6 +495,7 @@ set(kwin_KDEINIT_SRCS
|
|||
workspace.cpp
|
||||
x11eventfilter.cpp
|
||||
xcbutils.cpp
|
||||
xdgshellclient.cpp
|
||||
xkb.cpp
|
||||
xwl/xwayland_interface.cpp
|
||||
)
|
||||
|
|
|
@ -33,7 +33,7 @@ integrationTest(NAME testDebugConsole SRCS debug_console_test.cpp)
|
|||
integrationTest(NAME testDontCrashEmptyDeco SRCS dont_crash_empty_deco.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testPlasmaSurface SRCS plasma_surface_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testMaximized SRCS maximize_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testShellClient SRCS shell_client_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testXdgShellClient SRCS xdgshellclient_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testDontCrashNoBorder SRCS dont_crash_no_border.cpp)
|
||||
integrationTest(NAME testXwaylandSelections SRCS xwayland_selections_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testSceneOpenGL SRCS scene_opengl_test.cpp generic_scene_opengl_test.cpp)
|
||||
|
@ -51,7 +51,7 @@ integrationTest(WAYLAND_ONLY NAME testShowingDesktop SRCS showing_desktop_test.c
|
|||
integrationTest(WAYLAND_ONLY NAME testDontCrashUseractionsMenu SRCS dont_crash_useractions_menu.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testKWinBindings SRCS kwinbindings_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testVirtualDesktop SRCS virtual_desktop_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testShellClientRules SRCS shell_client_rules_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testXdgShellClientRules SRCS xdgshellclient_rules_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testIdleInhibition SRCS idle_inhibition_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testColorCorrectNightColor SRCS colorcorrect_nightcolor_test.cpp)
|
||||
integrationTest(WAYLAND_ONLY NAME testDontCrashCursorPhysicalSizeEmpty SRCS dont_crash_cursor_physical_size_empty.cpp)
|
||||
|
|
|
@ -23,9 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <KWayland/Client/surface.h>
|
||||
|
||||
|
@ -58,7 +58,7 @@ private:
|
|||
void ActivationTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<AbstractClient *>();
|
||||
qRegisterMetaType<ShellClient *>();
|
||||
qRegisterMetaType<XdgShellClient *>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -101,13 +101,13 @@ void ActivationTest::testSwitchToWindowToLeft()
|
|||
// Create several clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -117,13 +117,13 @@ void ActivationTest::testSwitchToWindowToLeft()
|
|||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -169,13 +169,13 @@ void ActivationTest::testSwitchToWindowToRight()
|
|||
// Create several clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -185,13 +185,13 @@ void ActivationTest::testSwitchToWindowToRight()
|
|||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -237,13 +237,13 @@ void ActivationTest::testSwitchToWindowAbove()
|
|||
// Create several clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -253,13 +253,13 @@ void ActivationTest::testSwitchToWindowAbove()
|
|||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -305,13 +305,13 @@ void ActivationTest::testSwitchToWindowBelow()
|
|||
// Create several clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client2);
|
||||
QVERIFY(client2->isActive());
|
||||
|
||||
|
@ -321,13 +321,13 @@ void ActivationTest::testSwitchToWindowBelow()
|
|||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -374,14 +374,14 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
// Create several maximized clients on the left screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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 geometryChangedSpy1(client1, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy1(client1, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy1.isValid());
|
||||
shellSurface1->ackConfigure(configureRequestedSpy1.last().at(2).value<quint32>());
|
||||
Test::render(surface1.data(), configureRequestedSpy1.last().at(0).toSize(), Qt::red);
|
||||
|
@ -389,14 +389,14 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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 geometryChangedSpy2(client2, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy2(client2, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy2.isValid());
|
||||
shellSurface2->ackConfigure(configureRequestedSpy2.last().at(2).value<quint32>());
|
||||
Test::render(surface2.data(), configureRequestedSpy2.last().at(0).toSize(), Qt::red);
|
||||
|
@ -410,13 +410,13 @@ void ActivationTest::testSwitchToWindowMaximized()
|
|||
// Create several clients on the right screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
@ -459,14 +459,14 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
// Create several maximized clients on the top screen.
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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 geometryChangedSpy1(client1, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy1(client1, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy1.isValid());
|
||||
shellSurface1->ackConfigure(configureRequestedSpy1.last().at(2).value<quint32>());
|
||||
Test::render(surface1.data(), configureRequestedSpy1.last().at(0).toSize(), Qt::red);
|
||||
|
@ -474,14 +474,14 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
|
||||
QScopedPointer<Surface> surface2(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface2(Test::createXdgShellStableSurface(surface2.data()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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 geometryChangedSpy2(client2, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy2(client2, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy2.isValid());
|
||||
shellSurface2->ackConfigure(configureRequestedSpy2.last().at(2).value<quint32>());
|
||||
Test::render(surface2.data(), configureRequestedSpy2.last().at(0).toSize(), Qt::red);
|
||||
|
@ -495,13 +495,13 @@ void ActivationTest::testSwitchToWindowFullScreen()
|
|||
// Create several clients on the bottom screen.
|
||||
QScopedPointer<Surface> surface3(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface3(Test::createXdgShellStableSurface(surface3.data()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client4);
|
||||
QVERIFY(client4->isActive());
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "xcbutils.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
|
@ -58,7 +58,7 @@ private:
|
|||
|
||||
void ActivitiesTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "generic_scene_opengl_test.h"
|
||||
|
||||
#include "composite.h"
|
||||
#include "shell_client.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
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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, &ShellClient::damaged);
|
||||
QSignalSpy damagedSpy(client, &XdgShellClient::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);
|
||||
ShellClient *parent = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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, &ShellClient::damaged);
|
||||
QSignalSpy damagedParentSpy(parent, &XdgShellClient::damaged);
|
||||
QVERIFY(damagedParentSpy.isValid());
|
||||
Test::render(surface.data(), QSize(20, 10), Qt::red);
|
||||
parentSurface->commit(Surface::CommitFlag::None);
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "platform.h"
|
||||
#include "rules.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -61,15 +61,15 @@ private Q_SLOTS:
|
|||
void cleanup();
|
||||
|
||||
void testGetWindowInfoInvalidUuid();
|
||||
void testGetWindowInfoShellClient_data();
|
||||
void testGetWindowInfoShellClient();
|
||||
void testGetWindowInfoXdgShellClient_data();
|
||||
void testGetWindowInfoXdgShellClient();
|
||||
void testGetWindowInfoX11Client();
|
||||
};
|
||||
|
||||
void TestDbusInterface::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -112,7 +112,7 @@ void TestDbusInterface::testGetWindowInfoInvalidUuid()
|
|||
QVERIFY(windowData.empty());
|
||||
}
|
||||
|
||||
void TestDbusInterface::testGetWindowInfoShellClient_data()
|
||||
void TestDbusInterface::testGetWindowInfoXdgShellClient_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -120,7 +120,7 @@ void TestDbusInterface::testGetWindowInfoShellClient_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestDbusInterface::testGetWindowInfoShellClient()
|
||||
void TestDbusInterface::testGetWindowInfoXdgShellClient()
|
||||
{
|
||||
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
|
@ -135,7 +135,7 @@ void TestDbusInterface::testGetWindowInfoShellClient()
|
|||
Test::render(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(clientAddedSpy.isEmpty());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto client = clientAddedSpy.first().first().value<ShellClient*>();
|
||||
auto client = clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
QVERIFY(client);
|
||||
|
||||
// let's get the window info
|
||||
|
@ -226,7 +226,7 @@ void TestDbusInterface::testGetWindowInfoShellClient()
|
|||
|
||||
// finally close window
|
||||
const auto id = client->internalId();
|
||||
QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "internal_client.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xcbutils.h"
|
||||
|
@ -60,7 +60,7 @@ void DebugConsoleTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -393,7 +393,7 @@ void DebugConsoleTest::testWaylandClient()
|
|||
shellSurface.reset();
|
||||
Test::flushWaylandConnection();
|
||||
qDebug() << rowsRemovedSpy.count();
|
||||
QEXPECT_FAIL("wlShell", "Deleting a ShellSurface does not result in the server removing the ShellClient", Continue);
|
||||
QEXPECT_FAIL("wlShell", "Deleting a ShellSurface does not result in the server removing the XdgShellClient", Continue);
|
||||
QVERIFY(rowsRemovedSpy.wait(500));
|
||||
surface.reset();
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "touch_input.h"
|
||||
#include "screenedge.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include <kwineffects.h>
|
||||
|
@ -135,7 +135,7 @@ void DecorationInputTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "xcbutils.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
|
@ -52,7 +52,7 @@ private:
|
|||
|
||||
void X11DesktopWindowTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KDecoration2/Decoration>
|
||||
|
@ -54,7 +54,7 @@ private Q_SLOTS:
|
|||
void DontCrashAuroraeDestroyDecoTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "effectloader.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "scripting/scriptedeffect.h"
|
||||
|
@ -56,7 +56,7 @@ private Q_SLOTS:
|
|||
void DontCrashCancelAnimationFromAnimationEndedTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
|
||||
|
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -67,7 +67,7 @@ void DontCrashCursorPhysicalSizeEmpty::cleanup()
|
|||
|
||||
void DontCrashCursorPhysicalSizeEmpty::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KDecoration2/Decoration>
|
||||
|
@ -50,7 +50,7 @@ private Q_SLOTS:
|
|||
|
||||
void DontCrashEmptyDecorationTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/server_decoration.h>
|
||||
|
@ -56,7 +56,7 @@ private Q_SLOTS:
|
|||
|
||||
void DontCrashNoBorder::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -60,7 +60,7 @@ void DontCrashReinitializeCompositorTest::initTestCase()
|
|||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -134,7 +134,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Make sure that only the test effect is loaded.
|
||||
|
@ -147,7 +147,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor()
|
|||
QVERIFY(!effect->isActive());
|
||||
|
||||
// Close the test client.
|
||||
QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "keyboard_input.h"
|
||||
#include "platform.h"
|
||||
#include "pointer_input.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "useractions.h"
|
||||
#include "wayland_server.h"
|
||||
|
@ -56,7 +56,7 @@ private Q_SLOTS:
|
|||
|
||||
void TestDontCrashUseractionsMenu::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -57,7 +57,7 @@ void DesktopSwitchingAnimationTest::initTestCase()
|
|||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -128,7 +128,7 @@ void DesktopSwitchingAnimationTest::testSwitchDesktops()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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());
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
void FadeTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -57,7 +57,7 @@ void MaximizeAnimationTest::initTestCase()
|
|||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -133,7 +133,7 @@ void MaximizeAnimationTest::testMaximizeRestore()
|
|||
|
||||
// Draw contents of the surface.
|
||||
shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QCOMPARE(client->maximizeMode(), MaximizeMode::MaximizeRestore);
|
||||
|
@ -157,9 +157,9 @@ void MaximizeAnimationTest::testMaximizeRestore()
|
|||
QVERIFY(!effect->isActive());
|
||||
|
||||
// Maximize the client.
|
||||
QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
QSignalSpy maximizeChangedSpy(client, qOverload<AbstractClient *, bool, bool>(&ShellClient::clientMaximizedStateChanged));
|
||||
QSignalSpy maximizeChangedSpy(client, qOverload<AbstractClient *, bool, bool>(&XdgShellClient::clientMaximizedStateChanged));
|
||||
QVERIFY(maximizeChangedSpy.isValid());
|
||||
|
||||
workspace()->slotWindowMaximize();
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -59,7 +59,7 @@ void MinimizeAnimationTest::initTestCase()
|
|||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -134,7 +134,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize()
|
|||
plasmaPanelShellSurface->setRole(PlasmaShellSurface::Role::Panel);
|
||||
plasmaPanelShellSurface->setPosition(panelRect.topLeft());
|
||||
plasmaPanelShellSurface->setPanelBehavior(PlasmaShellSurface::PanelBehavior::AlwaysVisible);
|
||||
ShellClient *panel = Test::renderAndWaitForShown(panelSurface.data(), panelRect.size(), Qt::blue);
|
||||
XdgShellClient *panel = Test::renderAndWaitForShown(panelSurface.data(), panelRect.size(), Qt::blue);
|
||||
QVERIFY(panel);
|
||||
QVERIFY(panel->isDock());
|
||||
QCOMPARE(panel->geometry(), panelRect);
|
||||
|
@ -146,7 +146,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
QVERIFY(plasmaWindowCreatedSpy.wait());
|
||||
QCOMPARE(plasmaWindowCreatedSpy.count(), 2);
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "internal_client.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "useractions.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -66,7 +66,7 @@ void PopupOpenCloseAnimationTest::initTestCase()
|
|||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -119,7 +119,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
QVERIFY(!mainWindowSurface.isNull());
|
||||
QScopedPointer<XdgShellSurface> mainWindowShellSurface(Test::createXdgShellStableSurface(mainWindowSurface.data()));
|
||||
QVERIFY(!mainWindowShellSurface.isNull());
|
||||
ShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(mainWindow);
|
||||
|
||||
// Load effect that will be tested.
|
||||
|
@ -139,7 +139,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
positioner.setAnchorEdge(Qt::BottomEdge | Qt::LeftEdge);
|
||||
QScopedPointer<XdgShellPopup> popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), mainWindowShellSurface.data(), positioner));
|
||||
QVERIFY(!popupShellSurface.isNull());
|
||||
ShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red);
|
||||
XdgShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red);
|
||||
QVERIFY(popup);
|
||||
QVERIFY(popup->isPopupWindow());
|
||||
QCOMPARE(popup->transientFor(), mainWindow);
|
||||
|
@ -149,7 +149,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
|
|||
QTRY_VERIFY(!effect->isActive());
|
||||
|
||||
// Destroy the popup, it should not be animated.
|
||||
QSignalSpy popupClosedSpy(popup, &ShellClient::windowClosed);
|
||||
QSignalSpy popupClosedSpy(popup, &XdgShellClient::windowClosed);
|
||||
QVERIFY(popupClosedSpy.isValid());
|
||||
popupShellSurface.reset();
|
||||
popupSurface.reset();
|
||||
|
@ -181,7 +181,7 @@ void PopupOpenCloseAnimationTest::testAnimateUserActionsPopup()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Load effect that will be tested.
|
||||
|
@ -236,7 +236,7 @@ void PopupOpenCloseAnimationTest::testAnimateDecorationTooltips()
|
|||
QScopedPointer<XdgDecoration> deco(Test::xdgDecorationManager()->getToplevelDecoration(shellSurface.data()));
|
||||
QVERIFY(!deco.isNull());
|
||||
deco->setMode(XdgDecoration::Mode::ServerSide);
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isDecorated());
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ along with this program. If not, see <http:// www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -143,7 +143,7 @@ bool ScriptedEffectWithDebugSpy::load(const QString &name)
|
|||
|
||||
void ScriptedEffectsTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
|
@ -511,7 +511,7 @@ void ScriptedEffectsTest::testGrab()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -544,7 +544,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindow()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -581,7 +581,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindowForced()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -612,7 +612,7 @@ void ScriptedEffectsTest::testUngrab()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -655,7 +655,7 @@ void ScriptedEffectsTest::testRedirect()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
@ -733,7 +733,7 @@ void ScriptedEffectsTest::testComplete()
|
|||
QVERIFY(surface);
|
||||
XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface);
|
||||
QVERIFY(shellSurface);
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
QCOMPARE(workspace()->activeClient(), c);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -61,7 +61,7 @@ private Q_SLOTS:
|
|||
void SlidingPopupsTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -61,7 +61,7 @@ void ToplevelOpenCloseAnimationTest::initTestCase()
|
|||
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -137,7 +137,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(effect->isActive());
|
||||
|
||||
|
@ -146,7 +146,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
|
|||
|
||||
// Close the test client, the effect should start animating the disappearing
|
||||
// of the client.
|
||||
QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
@ -181,7 +181,7 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups()
|
|||
QVERIFY(!mainWindowSurface.isNull());
|
||||
QScopedPointer<XdgShellSurface> mainWindowShellSurface(Test::createXdgShellStableSurface(mainWindowSurface.data()));
|
||||
QVERIFY(!mainWindowShellSurface.isNull());
|
||||
ShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(mainWindow);
|
||||
|
||||
// Load effect that will be tested.
|
||||
|
@ -201,14 +201,14 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups()
|
|||
positioner.setAnchorEdge(Qt::BottomEdge | Qt::LeftEdge);
|
||||
QScopedPointer<XdgShellPopup> popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), mainWindowShellSurface.data(), positioner));
|
||||
QVERIFY(!popupShellSurface.isNull());
|
||||
ShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red);
|
||||
XdgShellClient *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, &ShellClient::windowClosed);
|
||||
QSignalSpy popupClosedSpy(popup, &XdgShellClient::windowClosed);
|
||||
QVERIFY(popupClosedSpy.isValid());
|
||||
popupShellSurface.reset();
|
||||
popupSurface.reset();
|
||||
|
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
void TranslucencyTest::initTestCase()
|
||||
{
|
||||
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -50,7 +50,7 @@ private Q_SLOTS:
|
|||
|
||||
void WindowGeometryTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effectloader.h"
|
||||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "effect_builtins.h"
|
||||
|
@ -56,7 +56,7 @@ private Q_SLOTS:
|
|||
|
||||
void WobblyWindowsShadeTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Effect*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "platform.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "effect_builtins.h"
|
||||
|
||||
|
@ -49,7 +49,7 @@ void GenericSceneOpenGLTest::cleanup()
|
|||
|
||||
void GenericSceneOpenGLTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "internal_client.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "useractions.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -65,7 +65,7 @@ void GlobalShortcutsTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -54,7 +54,7 @@ private Q_SLOTS:
|
|||
|
||||
void TestIdleInhibition::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -268,7 +268,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
|
|||
QCOMPARE(inhibitedSpy.count(), 1);
|
||||
|
||||
// Unmap the client.
|
||||
QSignalSpy hiddenSpy(c, &ShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(c, &XdgShellClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
@ -280,7 +280,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped()
|
|||
QCOMPARE(inhibitedSpy.count(), 2);
|
||||
|
||||
// Map the client.
|
||||
QSignalSpy windowShownSpy(c, &ShellClient::windowShown);
|
||||
QSignalSpy windowShownSpy(c, &XdgShellClient::windowShown);
|
||||
QVERIFY(windowShownSpy.isValid());
|
||||
Test::render(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(windowShownSpy.wait());
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -61,7 +61,7 @@ private:
|
|||
|
||||
void InputStackingOrderTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "internal_client.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -185,7 +185,7 @@ void InternalWindowTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::InternalClient *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
|
|
@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "keyboard_input.h"
|
||||
#include "keyboard_layout.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -74,7 +74,7 @@ void KeyboardLayoutTest::reconfigureLayouts()
|
|||
|
||||
void KeyboardLayoutTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "keyboard_input.h"
|
||||
#include "keyboard_layout.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -57,7 +57,7 @@ void KeymapCreationFailureTest::initTestCase()
|
|||
qputenv("XKB_DEFAULT_VARIANT", "no");
|
||||
qputenv("XKB_DEFAULT_OPTIONS", "no");
|
||||
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -58,7 +58,7 @@ class Xwayland;
|
|||
}
|
||||
|
||||
class AbstractClient;
|
||||
class ShellClient;
|
||||
class XdgShellClient;
|
||||
|
||||
class WaylandTestApplication : public ApplicationWaylandAbstract
|
||||
{
|
||||
|
@ -181,15 +181,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 ShellClient is shown and returns the created ShellClient.
|
||||
* If no ShellClient gets shown during @p timeout @c null is returned.
|
||||
* Waits till a new XdgShellClient is shown and returns the created XdgShellClient.
|
||||
* If no XdgShellClient gets shown during @p timeout @c null is returned.
|
||||
*/
|
||||
ShellClient *waitForWaylandWindowShown(int timeout = 5000);
|
||||
XdgShellClient *waitForWaylandWindowShown(int timeout = 5000);
|
||||
|
||||
/**
|
||||
* Combination of @link{render} and @link{waitForWaylandWindowShown}.
|
||||
*/
|
||||
ShellClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32, int timeout = 5000);
|
||||
XdgShellClient *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.
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "input.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "scripting/scripting.h"
|
||||
#include "useractions.h"
|
||||
#include "virtualdesktops.h"
|
||||
|
@ -57,7 +57,7 @@ private Q_SLOTS:
|
|||
|
||||
void KWinBindingsTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -183,7 +183,7 @@ AbstractClient *LockScreenTest::showWindow()
|
|||
|
||||
void LockScreenTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "decorations/decorationbridge.h"
|
||||
#include "decorations/settings.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -61,7 +61,7 @@ private Q_SLOTS:
|
|||
|
||||
void TestMaximized::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -103,7 +103,7 @@ void TestMaximized::cleanup()
|
|||
|
||||
void TestMaximized::testMaximizedPassedToDeco()
|
||||
{
|
||||
// this test verifies that when a ShellClient gets maximized the Decoration receives the signal
|
||||
// this test verifies that when a XdgShellClient gets maximized the Decoration receives the signal
|
||||
|
||||
// Create the test client.
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -202,7 +202,7 @@ void TestMaximized::testInitiallyMaximized()
|
|||
|
||||
// Now let's render in an incorrect size.
|
||||
shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->geometry(), QRect(0, 0, 100, 50));
|
||||
QEXPECT_FAIL("", "Should go out of maximzied", Continue);
|
||||
|
@ -249,7 +249,7 @@ void TestMaximized::testBorderlessMaximizedWindow()
|
|||
|
||||
// Map the client.
|
||||
shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value<quint32>());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isActive());
|
||||
QCOMPARE(client->maximizeMode(), MaximizeMode::MaximizeRestore);
|
||||
|
@ -326,7 +326,7 @@ void TestMaximized::testBorderlessMaximizedWindowNoClientSideDecoration()
|
|||
|
||||
auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
|
||||
QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
QSignalSpy sizeChangeRequestedSpy(xdgShellSurface.data(), &XdgShellSurface::sizeChanged);
|
||||
QVERIFY(sizeChangeRequestedSpy.isValid());
|
||||
|
|
|
@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "deleted.h"
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -94,7 +94,7 @@ void MoveResizeWindowTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -321,7 +321,7 @@ void MoveResizeWindowTest::testResize()
|
|||
QCOMPARE(moveResizedChangedSpy.count(), 2);
|
||||
QCOMPARE(c->isResize(), false);
|
||||
QCOMPARE(workspace()->moveResizeClient(), nullptr);
|
||||
QEXPECT_FAIL("", "ShellClient currently doesn't send final configure event", Abort);
|
||||
QEXPECT_FAIL("", "XdgShellClient currently doesn't send final configure event", Abort);
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
QCOMPARE(configureRequestedSpy.count(), 6);
|
||||
states = configureRequestedSpy.last().at(1).value<XdgShellSurface::States>();
|
||||
|
@ -816,7 +816,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingX11Panel()
|
|||
QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint);
|
||||
|
||||
// and close
|
||||
QSignalSpy windowClosedSpy(testWindow, &ShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(testWindow, &XdgShellClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
@ -882,7 +882,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
|
|||
QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint);
|
||||
|
||||
// and destroy the panel again
|
||||
QSignalSpy panelClosedSpy(panel, &ShellClient::windowClosed);
|
||||
QSignalSpy panelClosedSpy(panel, &XdgShellClient::windowClosed);
|
||||
QVERIFY(panelClosedSpy.isValid());
|
||||
plasmaSurface.reset();
|
||||
panelShellSurface.reset();
|
||||
|
@ -893,7 +893,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
|
|||
QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint);
|
||||
|
||||
// and close
|
||||
QSignalSpy windowClosedSpy(testWindow, &ShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(testWindow, &XdgShellClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
shellSurface.reset();
|
||||
surface.reset();
|
||||
|
@ -920,7 +920,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboard()
|
|||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
client->move(100, 300);
|
||||
QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->geometry(), QRect(100, 300, 500, 800));
|
||||
|
@ -963,7 +963,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithMaximize()
|
|||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
client->move(100, 300);
|
||||
QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->geometry(), QRect(100, 300, 500, 800));
|
||||
|
@ -1014,7 +1014,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithFullScreen()
|
|||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
||||
client->move(100, 300);
|
||||
QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->geometry(), QRect(100, 300, 500, 800));
|
||||
|
@ -1055,7 +1055,7 @@ void MoveResizeWindowTest::testDestroyMoveClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start moving the client.
|
||||
|
@ -1092,7 +1092,7 @@ void MoveResizeWindowTest::testDestroyResizeClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start resizing the client.
|
||||
|
@ -1129,7 +1129,7 @@ void MoveResizeWindowTest::testUnmapMoveClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start resizing the client.
|
||||
|
@ -1148,7 +1148,7 @@ void MoveResizeWindowTest::testUnmapMoveClient()
|
|||
QCOMPARE(client->isResize(), false);
|
||||
|
||||
// Unmap the client while we're moving it.
|
||||
QSignalSpy hiddenSpy(client, &ShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
@ -1175,7 +1175,7 @@ void MoveResizeWindowTest::testUnmapResizeClient()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(client);
|
||||
|
||||
// Start resizing the client.
|
||||
|
@ -1194,7 +1194,7 @@ void MoveResizeWindowTest::testUnmapResizeClient()
|
|||
QCOMPARE(client->isResize(), true);
|
||||
|
||||
// Unmap the client while we're resizing it.
|
||||
QSignalSpy hiddenSpy(client, &ShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -89,7 +89,7 @@ void TestPlacement::cleanup()
|
|||
|
||||
void TestPlacement::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -215,7 +215,7 @@ void TestPlacement::testPlaceCentered()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->geometry(), QRect(590, 487, 100, 50));
|
||||
|
||||
|
@ -237,7 +237,7 @@ void TestPlacement::testPlaceUnderMouse()
|
|||
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red);
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->geometry(), QRect(151, 276, 100, 50));
|
||||
|
||||
|
@ -256,21 +256,21 @@ void TestPlacement::testPlaceCascaded()
|
|||
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
XdgShellClient *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));
|
||||
|
@ -294,20 +294,20 @@ void TestPlacement::testPlaceRandom()
|
|||
|
||||
QScopedPointer<Surface> surface1(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data()));
|
||||
ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *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()));
|
||||
ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green);
|
||||
QVERIFY(client3);
|
||||
QVERIFY(client3->pos() != client1->pos());
|
||||
QVERIFY(client3->pos() != client2->pos());
|
||||
|
|
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "cursor.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -71,7 +71,7 @@ private:
|
|||
|
||||
void PlasmaSurfaceTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
|
||||
|
@ -110,7 +110,7 @@ void PlasmaSurfaceTest::testRoleOnAllDesktops_data()
|
|||
|
||||
void PlasmaSurfaceTest::testRoleOnAllDesktops()
|
||||
{
|
||||
// this test verifies that a ShellClient is set on all desktops when the role changes
|
||||
// this test verifies that a XdgShellClient is set on all desktops when the role changes
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/compositor.h>
|
||||
|
@ -68,7 +68,7 @@ private:
|
|||
|
||||
void PlasmaWindowTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -245,7 +245,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow()
|
|||
// first create the parent window
|
||||
QScopedPointer<Surface> parentSurface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> parentShellSurface(Test::createXdgShellStableSurface(parentSurface.data()));
|
||||
ShellClient *parentClient = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *parentClient = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(parentClient);
|
||||
QVERIFY(plasmaWindowCreatedSpy.wait());
|
||||
QCOMPARE(plasmaWindowCreatedSpy.count(), 1);
|
||||
|
@ -256,7 +256,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));
|
||||
ShellClient *popupClient = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::blue);
|
||||
XdgShellClient *popupClient = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::blue);
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(!plasmaWindowCreatedSpy.wait(100));
|
||||
QCOMPARE(plasmaWindowCreatedSpy.count(), 1);
|
||||
|
@ -274,13 +274,13 @@ void PlasmaWindowTest::testLockScreenNoPlasmaWindow()
|
|||
QSignalSpy plasmaWindowCreatedSpy(m_windowManagement, &PlasmaWindowManagement::windowCreated);
|
||||
QVERIFY(plasmaWindowCreatedSpy.isValid());
|
||||
|
||||
// this time we use a QSignalSpy on ShellClient as it'a a little bit more complex setup
|
||||
// this time we use a QSignalSpy on XdgShellClient as it'a a little bit more complex setup
|
||||
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
|
||||
QVERIFY(clientAddedSpy.isValid());
|
||||
// lock
|
||||
ScreenLocker::KSldApp::self()->lock(ScreenLocker::EstablishLock::Immediate);
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
QVERIFY(clientAddedSpy.first().first().value<ShellClient*>()->isLockScreen());
|
||||
QVERIFY(clientAddedSpy.first().first().value<XdgShellClient *>()->isLockScreen());
|
||||
// should not be sent to the client
|
||||
QVERIFY(plasmaWindowCreatedSpy.isEmpty());
|
||||
QVERIFY(!plasmaWindowCreatedSpy.wait());
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "keyboard_input.h"
|
||||
#include "platform.h"
|
||||
#include "pointer_input.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -69,7 +69,7 @@ private Q_SLOTS:
|
|||
void TestPointerConstraints::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<PointerFunc>();
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -30,7 +30,7 @@ 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 "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/buffer.h>
|
||||
|
@ -140,7 +140,7 @@ private:
|
|||
|
||||
void PointerInputTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -1209,7 +1209,7 @@ void PointerInputTest::testPopup()
|
|||
popupShellSurface->requestGrab(Test::waylandSeat(), 0); // FIXME: Serial.
|
||||
render(popupSurface, positioner.initialSize());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto popupClient = clientAddedSpy.last().first().value<ShellClient*>();
|
||||
auto popupClient = clientAddedSpy.last().first().value<XdgShellClient *>();
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(popupClient != window);
|
||||
QCOMPARE(window, workspace()->activeClient());
|
||||
|
@ -1300,7 +1300,7 @@ void PointerInputTest::testDecoCancelsPopup()
|
|||
popupShellSurface->requestGrab(Test::waylandSeat(), 0); // FIXME: Serial.
|
||||
render(popupSurface, positioner.initialSize());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto popupClient = clientAddedSpy.last().first().value<ShellClient*>();
|
||||
auto popupClient = clientAddedSpy.last().first().value<XdgShellClient *>();
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(popupClient != window);
|
||||
QCOMPARE(window, workspace()->activeClient());
|
||||
|
@ -1362,7 +1362,7 @@ void PointerInputTest::testWindowUnderCursorWhileButtonPressed()
|
|||
QVERIFY(popupShellSurface);
|
||||
render(popupSurface, positioner.initialSize());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto popupClient = clientAddedSpy.last().first().value<ShellClient*>();
|
||||
auto popupClient = clientAddedSpy.last().first().value<XdgShellClient *>();
|
||||
QVERIFY(popupClient);
|
||||
QVERIFY(popupClient != window);
|
||||
QVERIFY(window->geometry().contains(Cursor::pos()));
|
||||
|
@ -1501,7 +1501,7 @@ void PointerInputTest::testResizeCursor()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
||||
// move the cursor to the test position
|
||||
|
@ -1571,7 +1571,7 @@ void PointerInputTest::testMoveCursor()
|
|||
QVERIFY(!surface.isNull());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
QVERIFY(!shellSurface.isNull());
|
||||
ShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
XdgShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QVERIFY(c);
|
||||
|
||||
// move cursor to the test position
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "scripting/scripting.h"
|
||||
|
||||
#include <KDecoration2/DecoratedClient>
|
||||
|
@ -92,7 +92,7 @@ private:
|
|||
|
||||
void QuickTilingTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "shadow.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -112,7 +112,7 @@ void SceneOpenGLShadowTest::initTestCase()
|
|||
{
|
||||
// Copied from generic_scene_opengl_test.cpp
|
||||
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -49,7 +49,7 @@ 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 "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -116,7 +116,7 @@ void SceneQPainterShadowTest::initTestCase()
|
|||
{
|
||||
// Copied from scene_qpainter_test.cpp
|
||||
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "effect_builtins.h"
|
||||
#include "workspace.h"
|
||||
|
@ -68,7 +68,7 @@ void SceneQPainterTest::cleanup()
|
|||
|
||||
void SceneQPainterTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <netwm.h>
|
||||
|
@ -51,7 +51,7 @@ private Q_SLOTS:
|
|||
|
||||
void ScreenEdgeClientShowTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KDecoration2/Decoration>
|
||||
|
@ -49,7 +49,7 @@ private Q_SLOTS:
|
|||
|
||||
void ShadeTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -45,7 +45,7 @@ private Q_SLOTS:
|
|||
|
||||
void ShowingDesktopTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "deleted.h"
|
||||
#include "main.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -67,7 +67,7 @@ void StackingOrderTest::initTestCase()
|
|||
{
|
||||
qRegisterMetaType<KWin::AbstractClient *>();
|
||||
qRegisterMetaType<KWin::Deleted *>();
|
||||
qRegisterMetaType<KWin::ShellClient *>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -102,7 +102,7 @@ void StackingOrderTest::testTransientIsAboveParent()
|
|||
KWayland::Client::XdgShellSurface *parentShellSurface =
|
||||
Test::createXdgShellStableSurface(parentSurface, parentSurface);
|
||||
QVERIFY(parentShellSurface);
|
||||
ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
QVERIFY(parent);
|
||||
QVERIFY(parent->isActive());
|
||||
QVERIFY(!parent->isTransient());
|
||||
|
@ -118,7 +118,7 @@ void StackingOrderTest::testTransientIsAboveParent()
|
|||
Test::createXdgShellStableSurface(transientSurface, transientSurface);
|
||||
QVERIFY(transientShellSurface);
|
||||
transientShellSurface->setTransientFor(parentShellSurface);
|
||||
ShellClient *transient = Test::renderAndWaitForShown(
|
||||
XdgShellClient *transient = Test::renderAndWaitForShown(
|
||||
transientSurface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient);
|
||||
QVERIFY(transient->isActive());
|
||||
|
@ -146,7 +146,7 @@ void StackingOrderTest::testRaiseTransient()
|
|||
KWayland::Client::XdgShellSurface *parentShellSurface =
|
||||
Test::createXdgShellStableSurface(parentSurface, parentSurface);
|
||||
QVERIFY(parentShellSurface);
|
||||
ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
QVERIFY(parent);
|
||||
QVERIFY(parent->isActive());
|
||||
QVERIFY(!parent->isTransient());
|
||||
|
@ -162,7 +162,7 @@ void StackingOrderTest::testRaiseTransient()
|
|||
Test::createXdgShellStableSurface(transientSurface, transientSurface);
|
||||
QVERIFY(transientShellSurface);
|
||||
transientShellSurface->setTransientFor(parentShellSurface);
|
||||
ShellClient *transient = Test::renderAndWaitForShown(
|
||||
XdgShellClient *transient = Test::renderAndWaitForShown(
|
||||
transientSurface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient);
|
||||
QTRY_VERIFY(transient->isActive());
|
||||
|
@ -178,7 +178,7 @@ void StackingOrderTest::testRaiseTransient()
|
|||
KWayland::Client::XdgShellSurface *anotherShellSurface =
|
||||
Test::createXdgShellStableSurface(anotherSurface, anotherSurface);
|
||||
QVERIFY(anotherShellSurface);
|
||||
ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
XdgShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(anotherClient);
|
||||
QVERIFY(anotherClient->isActive());
|
||||
QVERIFY(!anotherClient->isTransient());
|
||||
|
@ -229,7 +229,7 @@ void StackingOrderTest::testDeletedTransient()
|
|||
KWayland::Client::XdgShellSurface *parentShellSurface =
|
||||
Test::createXdgShellStableSurface(parentSurface, parentSurface);
|
||||
QVERIFY(parentShellSurface);
|
||||
ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue);
|
||||
QVERIFY(parent);
|
||||
QVERIFY(parent->isActive());
|
||||
QVERIFY(!parent->isTransient());
|
||||
|
@ -244,7 +244,7 @@ void StackingOrderTest::testDeletedTransient()
|
|||
Test::createXdgShellStableSurface(transient1Surface, transient1Surface);
|
||||
QVERIFY(transient1ShellSurface);
|
||||
transient1ShellSurface->setTransientFor(parentShellSurface);
|
||||
ShellClient *transient1 = Test::renderAndWaitForShown(
|
||||
XdgShellClient *transient1 = Test::renderAndWaitForShown(
|
||||
transient1Surface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient1);
|
||||
QTRY_VERIFY(transient1->isActive());
|
||||
|
@ -261,7 +261,7 @@ void StackingOrderTest::testDeletedTransient()
|
|||
Test::createXdgShellStableSurface(transient2Surface, transient2Surface);
|
||||
QVERIFY(transient2ShellSurface);
|
||||
transient2ShellSurface->setTransientFor(transient1ShellSurface);
|
||||
ShellClient *transient2 = Test::renderAndWaitForShown(
|
||||
XdgShellClient *transient2 = Test::renderAndWaitForShown(
|
||||
transient2Surface, QSize(128, 128), Qt::red);
|
||||
QVERIFY(transient2);
|
||||
QTRY_VERIFY(transient2->isActive());
|
||||
|
@ -277,14 +277,14 @@ void StackingOrderTest::testDeletedTransient()
|
|||
QTRY_VERIFY(!transient2->isActive());
|
||||
|
||||
// Close the top-most transient.
|
||||
connect(transient2, &ShellClient::windowClosed, this,
|
||||
connect(transient2, &XdgShellClient::windowClosed, this,
|
||||
[](Toplevel *toplevel, Deleted *deleted) {
|
||||
Q_UNUSED(toplevel)
|
||||
deleted->refWindow();
|
||||
}
|
||||
);
|
||||
|
||||
QSignalSpy windowClosedSpy(transient2, &ShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(transient2, &XdgShellClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
delete transient2ShellSurface;
|
||||
delete transient2Surface;
|
||||
|
@ -571,7 +571,7 @@ void StackingOrderTest::testRaiseGroupTransient()
|
|||
KWayland::Client::XdgShellSurface *anotherShellSurface =
|
||||
Test::createXdgShellStableSurface(anotherSurface, anotherSurface);
|
||||
QVERIFY(anotherShellSurface);
|
||||
ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
XdgShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(anotherClient);
|
||||
QVERIFY(anotherClient->isActive());
|
||||
QVERIFY(!anotherClient->isTransient());
|
||||
|
@ -826,7 +826,7 @@ void StackingOrderTest::testKeepAbove()
|
|||
KWayland::Client::XdgShellSurface *clientAShellSurface =
|
||||
Test::createXdgShellStableSurface(clientASurface, clientASurface);
|
||||
QVERIFY(clientAShellSurface);
|
||||
ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
XdgShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientA);
|
||||
QVERIFY(clientA->isActive());
|
||||
QVERIFY(!clientA->keepAbove());
|
||||
|
@ -840,7 +840,7 @@ void StackingOrderTest::testKeepAbove()
|
|||
KWayland::Client::XdgShellSurface *clientBShellSurface =
|
||||
Test::createXdgShellStableSurface(clientBSurface, clientBSurface);
|
||||
QVERIFY(clientBShellSurface);
|
||||
ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
XdgShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientB);
|
||||
QVERIFY(clientB->isActive());
|
||||
QVERIFY(!clientB->keepAbove());
|
||||
|
@ -874,7 +874,7 @@ void StackingOrderTest::testKeepBelow()
|
|||
KWayland::Client::XdgShellSurface *clientAShellSurface =
|
||||
Test::createXdgShellStableSurface(clientASurface, clientASurface);
|
||||
QVERIFY(clientAShellSurface);
|
||||
ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
XdgShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientA);
|
||||
QVERIFY(clientA->isActive());
|
||||
QVERIFY(!clientA->keepBelow());
|
||||
|
@ -888,7 +888,7 @@ void StackingOrderTest::testKeepBelow()
|
|||
KWayland::Client::XdgShellSurface *clientBShellSurface =
|
||||
Test::createXdgShellStableSurface(clientBSurface, clientBSurface);
|
||||
QVERIFY(clientBShellSurface);
|
||||
ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
XdgShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green);
|
||||
QVERIFY(clientB);
|
||||
QVERIFY(clientB->isActive());
|
||||
QVERIFY(!clientB->keepBelow());
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/compositor.h>
|
||||
|
@ -67,7 +67,7 @@ private:
|
|||
|
||||
void StrutsTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
@ -168,7 +168,7 @@ void StrutsTest::testWaylandStruts()
|
|||
|
||||
QFETCH(QVector<QRect>, windowGeometries);
|
||||
// create the panels
|
||||
QHash<Surface*, ShellClient*> clients;
|
||||
QHash<Surface*, XdgShellClient *> clients;
|
||||
for (auto it = windowGeometries.constBegin(), end = windowGeometries.constEnd(); it != end; it++) {
|
||||
const QRect windowGeometry = *it;
|
||||
Surface *surface = Test::createSurface(m_compositor);
|
||||
|
@ -246,7 +246,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 geometryChangedSpy(c, &ShellClient::geometryShapeChanged);
|
||||
QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryShapeChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
plasmaSurface->setPosition(QPoint(1280, 1000));
|
||||
QVERIFY(geometryChangedSpy.wait());
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "input.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "tabbox/tabbox.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -52,7 +52,7 @@ private Q_SLOTS:
|
|||
|
||||
void TabBoxTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
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 "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screenlockerwatcher.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
|
@ -392,7 +392,7 @@ void render(Surface *surface, const QImage &img)
|
|||
surface->commit(Surface::CommitFlag::None);
|
||||
}
|
||||
|
||||
ShellClient *waitForWaylandWindowShown(int timeout)
|
||||
XdgShellClient *waitForWaylandWindowShown(int timeout)
|
||||
{
|
||||
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
|
||||
if (!clientAddedSpy.isValid()) {
|
||||
|
@ -401,10 +401,10 @@ ShellClient *waitForWaylandWindowShown(int timeout)
|
|||
if (!clientAddedSpy.wait(timeout)) {
|
||||
return nullptr;
|
||||
}
|
||||
return clientAddedSpy.first().first().value<ShellClient*>();
|
||||
return clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
}
|
||||
|
||||
ShellClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format, int timeout)
|
||||
XdgShellClient *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 @@ ShellClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QC
|
|||
if (!clientAddedSpy.wait(timeout)) {
|
||||
return nullptr;
|
||||
}
|
||||
return clientAddedSpy.first().first().value<ShellClient*>();
|
||||
return clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
}
|
||||
|
||||
void flushWaylandConnection()
|
||||
|
|
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "cursor.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -57,7 +57,7 @@ private:
|
|||
|
||||
void TouchInputTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -63,7 +63,7 @@ private Q_SLOTS:
|
|||
|
||||
void TransientPlacementTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -319,7 +319,7 @@ void TransientPlacementTest::testXdgPopupWithPanel()
|
|||
parent->setFullScreen(true);
|
||||
QVERIFY(fullscreenSpy.wait());
|
||||
parentShellSurface->ackConfigure(fullscreenSpy.first().at(2).value<quint32>());
|
||||
QSignalSpy geometryShapeChangedSpy{parent, &ShellClient::geometryShapeChanged};
|
||||
QSignalSpy geometryShapeChangedSpy{parent, &XdgShellClient::geometryShapeChanged};
|
||||
QVERIFY(geometryShapeChangedSpy.isValid());
|
||||
Test::render(parentSurface, fullscreenSpy.first().at(0).toSize(), Qt::red);
|
||||
QVERIFY(geometryShapeChangedSpy.wait());
|
||||
|
|
|
@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "main.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "virtualdesktops.h"
|
||||
|
||||
|
@ -51,7 +51,7 @@ private Q_SLOTS:
|
|||
|
||||
void VirtualDesktopTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
@ -157,7 +157,7 @@ void VirtualDesktopTest::testLastDesktopRemoved()
|
|||
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->desktop(), 2);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &ShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->desktops().count(), 1u);
|
||||
|
@ -201,7 +201,7 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops()
|
|||
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->desktop(), 3u);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &ShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->desktops().count(), 1u);
|
||||
|
@ -289,7 +289,7 @@ void VirtualDesktopTest::testRemoveDesktopWithWindow()
|
|||
|
||||
QVERIFY(client);
|
||||
QCOMPARE(client->desktop(), 3u);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &ShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedSpy.isValid());
|
||||
|
||||
QCOMPARE(client->desktops().count(), 1u);
|
||||
|
|
|
@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "rules.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <netwm.h>
|
||||
#include <xcb/xcb_icccm.h>
|
||||
|
@ -52,7 +52,7 @@ private Q_SLOTS:
|
|||
|
||||
void WindowRuleTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "keyboard_input.h"
|
||||
#include "platform.h"
|
||||
#include "pointer_input.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -63,7 +63,7 @@ private Q_SLOTS:
|
|||
|
||||
void TestWindowSelection::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "deleted.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -62,7 +62,7 @@ private Q_SLOTS:
|
|||
void X11ClientTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
QVERIFY(workspaceCreatedSpy.isValid());
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "deleted.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -59,9 +59,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
using namespace KWin;
|
||||
using namespace KWayland::Client;
|
||||
|
||||
static const QString s_socketName = QStringLiteral("wayland_test_kwin_shell_client-0");
|
||||
static const QString s_socketName = QStringLiteral("wayland_test_kwin_xdgshellclient-0");
|
||||
|
||||
class TestShellClient : public QObject
|
||||
class TestXdgShellClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private Q_SLOTS:
|
||||
|
@ -116,10 +116,10 @@ private Q_SLOTS:
|
|||
void testXdgWindowGeometry();
|
||||
};
|
||||
|
||||
void TestShellClient::initTestCase()
|
||||
void TestXdgShellClient::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWayland::Client::Output*>();
|
||||
|
||||
|
@ -137,7 +137,7 @@ void TestShellClient::initTestCase()
|
|||
waylandServer()->initWorkspace();
|
||||
}
|
||||
|
||||
void TestShellClient::init()
|
||||
void TestXdgShellClient::init()
|
||||
{
|
||||
QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration |
|
||||
Test::AdditionalWaylandInterface::XdgDecoration |
|
||||
|
@ -147,12 +147,12 @@ void TestShellClient::init()
|
|||
KWin::Cursor::setPos(QPoint(1280, 512));
|
||||
}
|
||||
|
||||
void TestShellClient::cleanup()
|
||||
void TestXdgShellClient::cleanup()
|
||||
{
|
||||
Test::destroyWaylandConnection();
|
||||
}
|
||||
|
||||
void TestShellClient::testMapUnmapMap_data()
|
||||
void TestXdgShellClient::testMapUnmapMap_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -160,7 +160,7 @@ void TestShellClient::testMapUnmapMap_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testMapUnmapMap()
|
||||
void TestXdgShellClient::testMapUnmapMap()
|
||||
{
|
||||
// this test verifies that mapping a previously mapped window works correctly
|
||||
QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
|
||||
|
@ -179,7 +179,7 @@ void TestShellClient::testMapUnmapMap()
|
|||
|
||||
QVERIFY(clientAddedSpy.isEmpty());
|
||||
QVERIFY(clientAddedSpy.wait());
|
||||
auto client = clientAddedSpy.first().first().value<ShellClient*>();
|
||||
auto client = clientAddedSpy.first().first().value<XdgShellClient *>();
|
||||
QVERIFY(client);
|
||||
QVERIFY(client->isShown(true));
|
||||
QCOMPARE(client->isHiddenInternal(), false);
|
||||
|
@ -205,12 +205,12 @@ void TestShellClient::testMapUnmapMap()
|
|||
QUuid deletedUuid;
|
||||
QCOMPARE(deletedUuid.isNull(), true);
|
||||
|
||||
connect(client, &ShellClient::windowClosed, this, [&deletedUuid] (Toplevel *, Deleted *d) { deletedUuid = d->internalId(); });
|
||||
connect(client, &XdgShellClient::windowClosed, this, [&deletedUuid] (Toplevel *, Deleted *d) { deletedUuid = d->internalId(); });
|
||||
|
||||
// now unmap
|
||||
QSignalSpy hiddenSpy(client, &ShellClient::windowHidden);
|
||||
QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden);
|
||||
QVERIFY(hiddenSpy.isValid());
|
||||
QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed);
|
||||
QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed);
|
||||
QVERIFY(windowClosedSpy.isValid());
|
||||
surface->attachBuffer(Buffer::Ptr());
|
||||
surface->commit(Surface::CommitFlag::None);
|
||||
|
@ -222,7 +222,7 @@ void TestShellClient::testMapUnmapMap()
|
|||
QCOMPARE(effectsWindowHiddenSpy.count(), 1);
|
||||
QCOMPARE(effectsWindowHiddenSpy.first().first().value<EffectWindow*>(), client->effectWindow());
|
||||
|
||||
QSignalSpy windowShownSpy(client, &ShellClient::windowShown);
|
||||
QSignalSpy windowShownSpy(client, &XdgShellClient::windowShown);
|
||||
QVERIFY(windowShownSpy.isValid());
|
||||
Test::render(surface.data(), QSize(100, 50), Qt::blue, QImage::Format_RGB32);
|
||||
QCOMPARE(clientAddedSpy.count(), 1);
|
||||
|
@ -258,7 +258,7 @@ void TestShellClient::testMapUnmapMap()
|
|||
QCOMPARE(deletedUuid, uuid);
|
||||
}
|
||||
|
||||
void TestShellClient::testDesktopPresenceChanged()
|
||||
void TestXdgShellClient::testDesktopPresenceChanged()
|
||||
{
|
||||
// this test verifies that the desktop presence changed signals are properly emitted
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -267,7 +267,7 @@ void TestShellClient::testDesktopPresenceChanged()
|
|||
QVERIFY(c);
|
||||
QCOMPARE(c->desktop(), 1);
|
||||
effects->setNumberOfDesktops(4);
|
||||
QSignalSpy desktopPresenceChangedClientSpy(c, &ShellClient::desktopPresenceChanged);
|
||||
QSignalSpy desktopPresenceChangedClientSpy(c, &XdgShellClient::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedClientSpy.isValid());
|
||||
QSignalSpy desktopPresenceChangedWorkspaceSpy(workspace(), &Workspace::desktopPresenceChanged);
|
||||
QVERIFY(desktopPresenceChangedWorkspaceSpy.isValid());
|
||||
|
@ -291,7 +291,7 @@ void TestShellClient::testDesktopPresenceChanged()
|
|||
QCOMPARE(desktopPresenceChangedEffectsSpy.first().at(2).toInt(), 2);
|
||||
}
|
||||
|
||||
void TestShellClient::testTransientPositionAfterRemap()
|
||||
void TestXdgShellClient::testTransientPositionAfterRemap()
|
||||
{
|
||||
// this test simulates the situation that a transient window gets reused and the parent window
|
||||
// moved between the two usages
|
||||
|
@ -311,7 +311,7 @@ void TestShellClient::testTransientPositionAfterRemap()
|
|||
QCOMPARE(transient->geometry(), QRect(c->geometry().topLeft() + QPoint(5, 10), QSize(50, 40)));
|
||||
|
||||
// unmap the transient
|
||||
QSignalSpy windowHiddenSpy(transient, &ShellClient::windowHidden);
|
||||
QSignalSpy windowHiddenSpy(transient, &XdgShellClient::windowHidden);
|
||||
QVERIFY(windowHiddenSpy.isValid());
|
||||
transientSurface->attachBuffer(Buffer::Ptr());
|
||||
transientSurface->commit(Surface::CommitFlag::None);
|
||||
|
@ -321,14 +321,14 @@ void TestShellClient::testTransientPositionAfterRemap()
|
|||
c->setGeometry(c->geometry().translated(5, 10));
|
||||
|
||||
// now map the transient again
|
||||
QSignalSpy windowShownSpy(transient, &ShellClient::windowShown);
|
||||
QSignalSpy windowShownSpy(transient, &XdgShellClient::windowShown);
|
||||
QVERIFY(windowShownSpy.isValid());
|
||||
Test::render(transientSurface.data(), QSize(50, 40), Qt::blue);
|
||||
QVERIFY(windowShownSpy.wait());
|
||||
QCOMPARE(transient->geometry(), QRect(c->geometry().topLeft() + QPoint(5, 10), QSize(50, 40)));
|
||||
}
|
||||
|
||||
void TestShellClient::testWindowOutputs_data()
|
||||
void TestXdgShellClient::testWindowOutputs_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -336,7 +336,7 @@ void TestShellClient::testWindowOutputs_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testWindowOutputs()
|
||||
void TestXdgShellClient::testWindowOutputs()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
|
@ -374,7 +374,7 @@ void TestShellClient::testWindowOutputs()
|
|||
QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280,0));
|
||||
}
|
||||
|
||||
void TestShellClient::testMinimizeActiveWindow_data()
|
||||
void TestXdgShellClient::testMinimizeActiveWindow_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -382,7 +382,7 @@ void TestShellClient::testMinimizeActiveWindow_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testMinimizeActiveWindow()
|
||||
void TestXdgShellClient::testMinimizeActiveWindow()
|
||||
{
|
||||
// this test verifies that when minimizing the active window it gets deactivated
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -414,7 +414,7 @@ void TestShellClient::testMinimizeActiveWindow()
|
|||
QCOMPARE(workspace()->activeClient(), c);
|
||||
}
|
||||
|
||||
void TestShellClient::testFullscreen_data()
|
||||
void TestXdgShellClient::testFullscreen_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
QTest::addColumn<ServerSideDecoration::Mode>("decoMode");
|
||||
|
@ -426,7 +426,7 @@ void TestShellClient::testFullscreen_data()
|
|||
QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server;
|
||||
}
|
||||
|
||||
void TestShellClient::testFullscreen()
|
||||
void TestXdgShellClient::testFullscreen()
|
||||
{
|
||||
// this test verifies that a window can be properly fullscreened
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -452,9 +452,9 @@ void TestShellClient::testFullscreen()
|
|||
QCOMPARE(c->clientSize(), QSize(100, 50));
|
||||
QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server);
|
||||
QCOMPARE(c->sizeForClientSize(c->clientSize()), c->geometry().size());
|
||||
QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged);
|
||||
QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged);
|
||||
QVERIFY(fullscreenChangedSpy.isValid());
|
||||
QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), &XdgShellSurface::sizeChanged);
|
||||
QVERIFY(sizeChangeRequestedSpy.isValid());
|
||||
|
@ -492,7 +492,7 @@ void TestShellClient::testFullscreen()
|
|||
QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server);
|
||||
}
|
||||
|
||||
void TestShellClient::testFullscreenRestore_data()
|
||||
void TestXdgShellClient::testFullscreenRestore_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -500,7 +500,7 @@ void TestShellClient::testFullscreenRestore_data()
|
|||
QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testFullscreenRestore()
|
||||
void TestXdgShellClient::testFullscreenRestore()
|
||||
{
|
||||
// this test verifies that windows created fullscreen can be later properly restored
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -528,9 +528,9 @@ void TestShellClient::testFullscreenRestore()
|
|||
|
||||
configureRequestedSpy.wait(100);
|
||||
|
||||
QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged);
|
||||
QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged);
|
||||
QVERIFY(fullscreenChangedSpy.isValid());
|
||||
QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
|
||||
// swap back to normal
|
||||
|
@ -553,7 +553,7 @@ void TestShellClient::testFullscreenRestore()
|
|||
QCOMPARE(c->geometry().size(), QSize(100, 50));
|
||||
}
|
||||
|
||||
void TestShellClient::testUserCanSetFullscreen_data()
|
||||
void TestXdgShellClient::testUserCanSetFullscreen_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -561,7 +561,7 @@ void TestShellClient::testUserCanSetFullscreen_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testUserCanSetFullscreen()
|
||||
void TestXdgShellClient::testUserCanSetFullscreen()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
|
@ -573,7 +573,7 @@ void TestShellClient::testUserCanSetFullscreen()
|
|||
QVERIFY(c->userCanSetFullScreen());
|
||||
}
|
||||
|
||||
void TestShellClient::testUserSetFullscreen_data()
|
||||
void TestXdgShellClient::testUserSetFullscreen_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -581,7 +581,7 @@ void TestShellClient::testUserSetFullscreen_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testUserSetFullscreen()
|
||||
void TestXdgShellClient::testUserSetFullscreen()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
|
@ -635,7 +635,7 @@ void TestShellClient::testUserSetFullscreen()
|
|||
QVERIFY(!c->isFullScreen());
|
||||
}
|
||||
|
||||
void TestShellClient::testMaximizedToFullscreen_data()
|
||||
void TestXdgShellClient::testMaximizedToFullscreen_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
QTest::addColumn<ServerSideDecoration::Mode>("decoMode");
|
||||
|
@ -647,7 +647,7 @@ void TestShellClient::testMaximizedToFullscreen_data()
|
|||
QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server;
|
||||
}
|
||||
|
||||
void TestShellClient::testMaximizedToFullscreen()
|
||||
void TestXdgShellClient::testMaximizedToFullscreen()
|
||||
{
|
||||
// this test verifies that a window can be properly fullscreened after maximizing
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -671,9 +671,9 @@ void TestShellClient::testMaximizedToFullscreen()
|
|||
QVERIFY(!c->isFullScreen());
|
||||
QCOMPARE(c->clientSize(), QSize(100, 50));
|
||||
QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server);
|
||||
QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged);
|
||||
QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged);
|
||||
QVERIFY(fullscreenChangedSpy.isValid());
|
||||
QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged);
|
||||
QVERIFY(geometryChangedSpy.isValid());
|
||||
QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), &XdgShellSurface::sizeChanged);
|
||||
QVERIFY(sizeChangeRequestedSpy.isValid());
|
||||
|
@ -728,7 +728,7 @@ void TestShellClient::testMaximizedToFullscreen()
|
|||
QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server);
|
||||
}
|
||||
|
||||
void TestShellClient::testWindowOpensLargerThanScreen_data()
|
||||
void TestXdgShellClient::testWindowOpensLargerThanScreen_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -736,7 +736,7 @@ void TestShellClient::testWindowOpensLargerThanScreen_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testWindowOpensLargerThanScreen()
|
||||
void TestXdgShellClient::testWindowOpensLargerThanScreen()
|
||||
{
|
||||
// this test creates a window which is as large as the screen, but is decorated
|
||||
// the window should get resized to fit into the screen, BUG: 366632
|
||||
|
@ -764,7 +764,7 @@ void TestShellClient::testWindowOpensLargerThanScreen()
|
|||
QVERIFY(sizeChangeRequestedSpy.wait(10));
|
||||
}
|
||||
|
||||
void TestShellClient::testHidden_data()
|
||||
void TestXdgShellClient::testHidden_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -772,7 +772,7 @@ void TestShellClient::testHidden_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testHidden()
|
||||
void TestXdgShellClient::testHidden()
|
||||
{
|
||||
// this test verifies that when hiding window it doesn't get shown
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -801,7 +801,7 @@ void TestShellClient::testHidden()
|
|||
//QCOMPARE(workspace()->activeClient(), c);
|
||||
}
|
||||
|
||||
void TestShellClient::testDesktopFileName()
|
||||
void TestXdgShellClient::testDesktopFileName()
|
||||
{
|
||||
QIcon::setThemeName(QStringLiteral("breeze"));
|
||||
// this test verifies that desktop file name is passed correctly to the window
|
||||
|
@ -813,19 +813,19 @@ void TestShellClient::testDesktopFileName()
|
|||
QVERIFY(c);
|
||||
QCOMPARE(c->desktopFileName(), QByteArrayLiteral("org.kde.foo"));
|
||||
QCOMPARE(c->resourceClass(), QByteArrayLiteral("org.kde.foo"));
|
||||
QVERIFY(c->resourceName().startsWith("testShellClient"));
|
||||
QVERIFY(c->resourceName().startsWith("testXdgShellClient"));
|
||||
// the desktop file does not exist, so icon should be generic Wayland
|
||||
QCOMPARE(c->icon().name(), QStringLiteral("wayland"));
|
||||
|
||||
QSignalSpy desktopFileNameChangedSpy(c, &AbstractClient::desktopFileNameChanged);
|
||||
QVERIFY(desktopFileNameChangedSpy.isValid());
|
||||
QSignalSpy iconChangedSpy(c, &ShellClient::iconChanged);
|
||||
QSignalSpy iconChangedSpy(c, &XdgShellClient::iconChanged);
|
||||
QVERIFY(iconChangedSpy.isValid());
|
||||
shellSurface->setAppId(QByteArrayLiteral("org.kde.bar"));
|
||||
QVERIFY(desktopFileNameChangedSpy.wait());
|
||||
QCOMPARE(c->desktopFileName(), QByteArrayLiteral("org.kde.bar"));
|
||||
QCOMPARE(c->resourceClass(), QByteArrayLiteral("org.kde.bar"));
|
||||
QVERIFY(c->resourceName().startsWith("testShellClient"));
|
||||
QVERIFY(c->resourceName().startsWith("testXdgShellClient"));
|
||||
// icon should still be wayland
|
||||
QCOMPARE(c->icon().name(), QStringLiteral("wayland"));
|
||||
QVERIFY(iconChangedSpy.isEmpty());
|
||||
|
@ -838,7 +838,7 @@ void TestShellClient::testDesktopFileName()
|
|||
QCOMPARE(c->icon().name(), QStringLiteral("kwin"));
|
||||
}
|
||||
|
||||
void TestShellClient::testCaptionSimplified()
|
||||
void TestXdgShellClient::testCaptionSimplified()
|
||||
{
|
||||
// this test verifies that caption is properly trimmed
|
||||
// see BUG 323798 comment #12
|
||||
|
@ -853,7 +853,7 @@ void TestShellClient::testCaptionSimplified()
|
|||
QCOMPARE(c->caption(), origTitle.simplified());
|
||||
}
|
||||
|
||||
void TestShellClient::testCaptionMultipleWindows()
|
||||
void TestXdgShellClient::testCaptionMultipleWindows()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
|
@ -890,7 +890,7 @@ void TestShellClient::testCaptionMultipleWindows()
|
|||
QCOMPARE(c4->caption(), QStringLiteral("bar"));
|
||||
QCOMPARE(c4->captionNormal(), QStringLiteral("bar"));
|
||||
QCOMPARE(c4->captionSuffix(), QString());
|
||||
QSignalSpy captionChangedSpy(c4, &ShellClient::captionChanged);
|
||||
QSignalSpy captionChangedSpy(c4, &XdgShellClient::captionChanged);
|
||||
QVERIFY(captionChangedSpy.isValid());
|
||||
shellSurface4->setTitle(QStringLiteral("foo"));
|
||||
QVERIFY(captionChangedSpy.wait());
|
||||
|
@ -900,7 +900,7 @@ void TestShellClient::testCaptionMultipleWindows()
|
|||
QCOMPARE(c4->captionSuffix(), QStringLiteral(" <4>"));
|
||||
}
|
||||
|
||||
void TestShellClient::testUnresponsiveWindow_data()
|
||||
void TestXdgShellClient::testUnresponsiveWindow_data()
|
||||
{
|
||||
QTest::addColumn<QString>("shellInterface");//see env selection in qwaylandintegration.cpp
|
||||
QTest::addColumn<bool>("socketMode");
|
||||
|
@ -911,7 +911,7 @@ void TestShellClient::testUnresponsiveWindow_data()
|
|||
//TODO add XDG WM Base when Kwin relies on Qt 5.12
|
||||
}
|
||||
|
||||
void TestShellClient::testUnresponsiveWindow()
|
||||
void TestXdgShellClient::testUnresponsiveWindow()
|
||||
{
|
||||
// this test verifies that killWindow properly terminates a process
|
||||
// for this an external binary is launched
|
||||
|
@ -986,7 +986,7 @@ void TestShellClient::testUnresponsiveWindow()
|
|||
QVERIFY(elapsed2 > 1800); //second ping comes in a second later
|
||||
}
|
||||
|
||||
void TestShellClient::testX11WindowId_data()
|
||||
void TestXdgShellClient::testX11WindowId_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -994,7 +994,7 @@ void TestShellClient::testX11WindowId_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testX11WindowId()
|
||||
void TestXdgShellClient::testX11WindowId()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QFETCH(Test::XdgShellSurfaceType, type);
|
||||
|
@ -1005,7 +1005,7 @@ void TestShellClient::testX11WindowId()
|
|||
QCOMPARE(c->window(), 0u);
|
||||
}
|
||||
|
||||
void TestShellClient::testAppMenu()
|
||||
void TestXdgShellClient::testAppMenu()
|
||||
{
|
||||
//register a faux appmenu client
|
||||
QVERIFY (QDBusConnection::sessionBus().registerService("org.kde.kappmenu"));
|
||||
|
@ -1015,7 +1015,7 @@ void TestShellClient::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, &ShellClient::hasApplicationMenuChanged);
|
||||
QSignalSpy spy(c, &XdgShellClient::hasApplicationMenuChanged);
|
||||
menu->setAddress("service.name", "object/path");
|
||||
spy.wait();
|
||||
QCOMPARE(c->hasApplicationMenu(), true);
|
||||
|
@ -1025,7 +1025,7 @@ void TestShellClient::testAppMenu()
|
|||
QVERIFY (QDBusConnection::sessionBus().unregisterService("org.kde.kappmenu"));
|
||||
}
|
||||
|
||||
void TestShellClient::testNoDecorationModeRequested_data()
|
||||
void TestXdgShellClient::testNoDecorationModeRequested_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -1033,7 +1033,7 @@ void TestShellClient::testNoDecorationModeRequested_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testNoDecorationModeRequested()
|
||||
void TestXdgShellClient::testNoDecorationModeRequested()
|
||||
{
|
||||
// this test verifies that the decoration follows the default mode if no mode is explicitly requested
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
|
@ -1053,7 +1053,7 @@ void TestShellClient::testNoDecorationModeRequested()
|
|||
QCOMPARE(c->isDecorated(), true);
|
||||
}
|
||||
|
||||
void TestShellClient::testSendClientWithTransientToDesktop_data()
|
||||
void TestXdgShellClient::testSendClientWithTransientToDesktop_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ void TestShellClient::testSendClientWithTransientToDesktop_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testSendClientWithTransientToDesktop()
|
||||
void TestXdgShellClient::testSendClientWithTransientToDesktop()
|
||||
{
|
||||
// this test verifies that when sending a client to a desktop all transients are also send to that desktop
|
||||
|
||||
|
@ -1108,7 +1108,7 @@ void TestShellClient::testSendClientWithTransientToDesktop()
|
|||
QCOMPARE(transient->desktop(), 1);
|
||||
}
|
||||
|
||||
void TestShellClient::testMinimizeWindowWithTransients_data()
|
||||
void TestXdgShellClient::testMinimizeWindowWithTransients_data()
|
||||
{
|
||||
QTest::addColumn<Test::XdgShellSurfaceType>("type");
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ void TestShellClient::testMinimizeWindowWithTransients_data()
|
|||
QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable;
|
||||
}
|
||||
|
||||
void TestShellClient::testMinimizeWindowWithTransients()
|
||||
void TestXdgShellClient::testMinimizeWindowWithTransients()
|
||||
{
|
||||
// this test verifies that when minimizing/unminimizing a window all its
|
||||
// transients will be minimized/unminimized as well
|
||||
|
@ -1150,7 +1150,7 @@ void TestShellClient::testMinimizeWindowWithTransients()
|
|||
QVERIFY(!transient->isMinimized());
|
||||
}
|
||||
|
||||
void TestShellClient::testXdgDecoration_data()
|
||||
void TestXdgShellClient::testXdgDecoration_data()
|
||||
{
|
||||
QTest::addColumn<KWayland::Client::XdgDecoration::Mode>("requestedMode");
|
||||
QTest::addColumn<KWayland::Client::XdgDecoration::Mode>("expectedMode");
|
||||
|
@ -1159,7 +1159,7 @@ void TestShellClient::testXdgDecoration_data()
|
|||
QTest::newRow("server side requested") << XdgDecoration::Mode::ServerSide << XdgDecoration::Mode::ServerSide;
|
||||
}
|
||||
|
||||
void TestShellClient::testXdgDecoration()
|
||||
void TestXdgShellClient::testXdgDecoration()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data()));
|
||||
|
@ -1189,14 +1189,14 @@ void TestShellClient::testXdgDecoration()
|
|||
QCOMPARE(c->isDecorated(), expectedMode == XdgDecoration::Mode::ServerSide);
|
||||
}
|
||||
|
||||
void TestShellClient::testXdgNeverCommitted()
|
||||
void TestXdgShellClient::testXdgNeverCommitted()
|
||||
{
|
||||
//check we don't crash if we create a shell object but delete the ShellClient before committing it
|
||||
//check we don't crash if we create a shell object but delete the XdgShellClient before committing it
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
}
|
||||
|
||||
void TestShellClient::testXdgInitialState()
|
||||
void TestXdgShellClient::testXdgInitialState()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
|
@ -1217,7 +1217,7 @@ void TestShellClient::testXdgInitialState()
|
|||
QCOMPARE(c->size(), QSize(200, 100));
|
||||
}
|
||||
|
||||
void TestShellClient::testXdgInitiallyMaximised()
|
||||
void TestXdgShellClient::testXdgInitiallyMaximised()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
|
@ -1243,7 +1243,7 @@ void TestShellClient::testXdgInitiallyMaximised()
|
|||
QCOMPARE(c->size(), QSize(1280, 1024));
|
||||
}
|
||||
|
||||
void TestShellClient::testXdgInitiallyMinimized()
|
||||
void TestXdgShellClient::testXdgInitiallyMinimized()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
|
@ -1270,7 +1270,7 @@ void TestShellClient::testXdgInitiallyMinimized()
|
|||
QVERIFY(c->isMinimized());
|
||||
}
|
||||
|
||||
void TestShellClient::testXdgWindowGeometry()
|
||||
void TestXdgShellClient::testXdgWindowGeometry()
|
||||
{
|
||||
QScopedPointer<Surface> surface(Test::createSurface());
|
||||
QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly));
|
||||
|
@ -1285,7 +1285,7 @@ void TestShellClient::testXdgWindowGeometry()
|
|||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(200,100), Qt::blue);
|
||||
configureRequestedSpy.wait(); //window activated after being shown
|
||||
|
||||
QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged);
|
||||
QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged);
|
||||
// resize to 300,200 in kwin terms
|
||||
c->setGeometry(QRect(100, 100, 300, 200));
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
|
@ -1306,5 +1306,5 @@ void TestShellClient::testXdgWindowGeometry()
|
|||
QCOMPARE(requestedFullScreenSize, QSize(1280, 1024));
|
||||
}
|
||||
|
||||
WAYLANDTEST_MAIN(TestShellClient)
|
||||
#include "shell_client_test.moc"
|
||||
WAYLANDTEST_MAIN(TestXdgShellClient)
|
||||
#include "xdgshellclient_test.moc"
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
|
||||
|
@ -51,7 +51,7 @@ private Q_SLOTS:
|
|||
|
||||
void XWaylandInputTest::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<KWin::Deleted*>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
#include "kwin_wayland_test.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -52,7 +52,7 @@ private:
|
|||
void XwaylandSelectionsTest::initTestCase()
|
||||
{
|
||||
QSKIP("Skipped as it fails for unknown reasons on build.kde.org");
|
||||
qRegisterMetaType<KWin::ShellClient*>();
|
||||
qRegisterMetaType<KWin::XdgShellClient *>();
|
||||
qRegisterMetaType<KWin::AbstractClient*>();
|
||||
qRegisterMetaType<QProcess::ExitStatus>();
|
||||
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
|
||||
|
|
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "scene.h"
|
||||
#include "screens.h"
|
||||
#include "shadow.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "unmanaged.h"
|
||||
#include "useractions.h"
|
||||
#include "utils.h"
|
||||
|
@ -365,7 +365,7 @@ void Compositor::startupWithWorkspace()
|
|||
|
||||
if (auto *server = waylandServer()) {
|
||||
const auto clients = server->clients();
|
||||
for (ShellClient *c : clients) {
|
||||
for (XdgShellClient *c : clients) {
|
||||
c->setupCompositing();
|
||||
c->getShadow();
|
||||
}
|
||||
|
@ -440,10 +440,10 @@ void Compositor::stop()
|
|||
}
|
||||
|
||||
if (waylandServer()) {
|
||||
for (ShellClient *c : waylandServer()->clients()) {
|
||||
for (XdgShellClient *c : waylandServer()->clients()) {
|
||||
m_scene->removeToplevel(c);
|
||||
}
|
||||
for (ShellClient *c : waylandServer()->clients()) {
|
||||
for (XdgShellClient *c : waylandServer()->clients()) {
|
||||
c->finishCompositing();
|
||||
}
|
||||
}
|
||||
|
@ -748,7 +748,7 @@ bool Compositor::windowRepaintsPending() const
|
|||
}
|
||||
if (auto *server = waylandServer()) {
|
||||
const auto &clients = server->clients();
|
||||
auto test = [](ShellClient *c) {
|
||||
auto test = [](XdgShellClient *c) {
|
||||
return c->readyForPainting() && !c->repaints().isEmpty();
|
||||
};
|
||||
if (std::any_of(clients.begin(), clients.end(), test)) {
|
||||
|
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "internal_client.h"
|
||||
#include "main.h"
|
||||
#include "scene.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "unmanaged.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
@ -798,12 +798,12 @@ DebugConsoleModel::DebugConsoleModel(QObject *parent)
|
|||
}
|
||||
// TODO: that only includes windows getting shown, not those which are only created
|
||||
connect(waylandServer(), &WaylandServer::shellClientAdded, this,
|
||||
[this] (ShellClient *c) {
|
||||
[this] (XdgShellClient *c) {
|
||||
add(s_waylandClientId -1, m_shellClients, c);
|
||||
}
|
||||
);
|
||||
connect(waylandServer(), &WaylandServer::shellClientRemoved, this,
|
||||
[this] (ShellClient *c) {
|
||||
[this] (XdgShellClient *c) {
|
||||
remove(s_waylandClientId -1, m_shellClients, c);
|
||||
}
|
||||
);
|
||||
|
@ -1113,7 +1113,7 @@ QVariant DebugConsoleModel::data(const QModelIndex &index, int role) const
|
|||
if (index.column() >= 2 || role != Qt::DisplayRole) {
|
||||
return QVariant();
|
||||
}
|
||||
if (ShellClient *c = shellClient(index)) {
|
||||
if (XdgShellClient *c = shellClient(index)) {
|
||||
return propertyData(c, index, role);
|
||||
} else if (InternalClient *c = internalClient(index)) {
|
||||
return propertyData(c, index, role);
|
||||
|
@ -1161,7 +1161,7 @@ static T *clientForIndex(const QModelIndex &index, const QVector<T*> &clients, i
|
|||
return clients.at(row);
|
||||
}
|
||||
|
||||
ShellClient *DebugConsoleModel::shellClient(const QModelIndex &index) const
|
||||
XdgShellClient *DebugConsoleModel::shellClient(const QModelIndex &index) const
|
||||
{
|
||||
return clientForIndex(index, m_shellClients, s_waylandClientId);
|
||||
}
|
||||
|
@ -1213,7 +1213,7 @@ SurfaceTreeModel::SurfaceTreeModel(QObject *parent)
|
|||
}
|
||||
if (waylandServer()) {
|
||||
connect(waylandServer(), &WaylandServer::shellClientAdded, this,
|
||||
[this, reset] (ShellClient *c) {
|
||||
[this, reset] (XdgShellClient *c) {
|
||||
connect(c->surface(), &SurfaceInterface::subSurfaceTreeChanged, this, reset);
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace KWin
|
|||
|
||||
class Client;
|
||||
class InternalClient;
|
||||
class ShellClient;
|
||||
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);
|
||||
ShellClient *shellClient(const QModelIndex &index) const;
|
||||
XdgShellClient *shellClient(const QModelIndex &index) const;
|
||||
InternalClient *internalClient(const QModelIndex &index) const;
|
||||
Client *x11Client(const QModelIndex &index) const;
|
||||
Unmanaged *unmanaged(const QModelIndex &index) const;
|
||||
int topLevelRowCount() const;
|
||||
|
||||
QVector<ShellClient*> m_shellClients;
|
||||
QVector<XdgShellClient *> m_shellClients;
|
||||
QVector<InternalClient*> m_internalClients;
|
||||
QVector<Client*> m_x11Clients;
|
||||
QVector<Unmanaged*> m_unmanageds;
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "group.h"
|
||||
#include "netinfo.h"
|
||||
#include "shadow.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "decorations/decoratedclient.h"
|
||||
#include "decorations/decorationrenderer.h"
|
||||
|
||||
|
@ -146,7 +146,7 @@ void Deleted::copyToDeleted(Toplevel* c)
|
|||
});
|
||||
}
|
||||
|
||||
m_wasWaylandClient = qobject_cast<ShellClient *>(c) != nullptr;
|
||||
m_wasWaylandClient = qobject_cast<XdgShellClient *>(c) != nullptr;
|
||||
m_wasX11Client = qobject_cast<Client *>(c) != nullptr;
|
||||
m_wasPopupWindow = c->isPopupWindow();
|
||||
m_wasOutline = c->isOutline();
|
||||
|
|
24
effects.cpp
24
effects.cpp
|
@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "composite.h"
|
||||
#include "xcbutils.h"
|
||||
#include "platform.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include "decorations/decorationbridge.h"
|
||||
|
@ -257,19 +257,19 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
|||
}
|
||||
if (auto w = waylandServer()) {
|
||||
connect(w, &WaylandServer::shellClientAdded, this,
|
||||
[this](ShellClient *c) {
|
||||
[this](XdgShellClient *c) {
|
||||
if (c->readyForPainting())
|
||||
slotShellClientShown(c);
|
||||
slotXdgShellClientShown(c);
|
||||
else
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotShellClientShown);
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotXdgShellClientShown);
|
||||
}
|
||||
);
|
||||
const auto clients = waylandServer()->clients();
|
||||
for (ShellClient *c : clients) {
|
||||
for (XdgShellClient *c : clients) {
|
||||
if (c->readyForPainting()) {
|
||||
setupAbstractClientConnections(c);
|
||||
} else {
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotShellClientShown);
|
||||
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotXdgShellClientShown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -574,9 +574,9 @@ void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
|||
emit windowAdded(c->effectWindow());
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::slotShellClientShown(Toplevel *t)
|
||||
void EffectsHandlerImpl::slotXdgShellClientShown(Toplevel *t)
|
||||
{
|
||||
ShellClient *c = static_cast<ShellClient*>(t);
|
||||
XdgShellClient *c = static_cast<XdgShellClient *>(t);
|
||||
setupAbstractClientConnections(c);
|
||||
emit windowAdded(t->effectWindow());
|
||||
}
|
||||
|
@ -1078,7 +1078,7 @@ EffectWindow* EffectsHandlerImpl::findWindow(WId id) const
|
|||
if (Unmanaged* w = Workspace::self()->findUnmanaged(id))
|
||||
return w->effectWindow();
|
||||
if (waylandServer()) {
|
||||
if (ShellClient *w = waylandServer()->findClient(id)) {
|
||||
if (XdgShellClient *w = waylandServer()->findClient(id)) {
|
||||
return w->effectWindow();
|
||||
}
|
||||
}
|
||||
|
@ -1088,7 +1088,7 @@ EffectWindow* EffectsHandlerImpl::findWindow(WId id) const
|
|||
EffectWindow* EffectsHandlerImpl::findWindow(KWayland::Server::SurfaceInterface *surf) const
|
||||
{
|
||||
if (waylandServer()) {
|
||||
if (ShellClient *w = waylandServer()->findClient(surf)) {
|
||||
if (XdgShellClient *w = waylandServer()->findClient(surf)) {
|
||||
return w->effectWindow();
|
||||
}
|
||||
}
|
||||
|
@ -1715,12 +1715,12 @@ EffectWindowImpl::EffectWindowImpl(Toplevel *toplevel)
|
|||
// emitted, effects can't distinguish managed windows from unmanaged
|
||||
// windows(e.g. combo box popups, popup menus, etc). Save value of the
|
||||
// managed property during construction of EffectWindow. At that time,
|
||||
// parent can be Client, ShellClient, or Unmanaged. So, later on, when
|
||||
// parent can be Client, XdgShellClient, or Unmanaged. So, later on, when
|
||||
// an instance of Deleted becomes parent of the EffectWindow, effects
|
||||
// can still figure out whether it is/was a managed window.
|
||||
managed = toplevel->isClient();
|
||||
|
||||
waylandClient = qobject_cast<KWin::ShellClient *>(toplevel) != nullptr;
|
||||
waylandClient = qobject_cast<KWin::XdgShellClient *>(toplevel) != nullptr;
|
||||
x11Client = qobject_cast<KWin::Client *>(toplevel) != nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ public Q_SLOTS:
|
|||
|
||||
protected Q_SLOTS:
|
||||
void slotClientShown(KWin::Toplevel*);
|
||||
void slotShellClientShown(KWin::Toplevel*);
|
||||
void slotXdgShellClientShown(KWin::Toplevel*);
|
||||
void slotUnmanagedShown(KWin::Toplevel*);
|
||||
void slotWindowClosed(KWin::Toplevel *c, KWin::Deleted *d);
|
||||
void slotClientMaximized(KWin::AbstractClient *c, MaximizeMode maxMode);
|
||||
|
|
|
@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QVarLengthArray>
|
||||
|
||||
#include "outline.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include <KDecoration2/Decoration>
|
||||
|
@ -201,7 +201,7 @@ void Workspace::updateClientArea(bool force)
|
|||
}
|
||||
}
|
||||
if (waylandServer()) {
|
||||
auto updateStrutsForWaylandClient = [&] (ShellClient *c) {
|
||||
auto updateStrutsForWaylandClient = [&] (XdgShellClient *c) {
|
||||
// assuming that only docks have "struts" and that all docks have a strut
|
||||
if (!c->hasStrut()) {
|
||||
return;
|
||||
|
|
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
#include "idle_inhibition.h"
|
||||
#include "deleted.h"
|
||||
#include "shell_client.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::registerShellClient(ShellClient *client)
|
||||
void IdleInhibition::registerXdgShellClient(XdgShellClient *client)
|
||||
{
|
||||
auto updateInhibit = [this, client] {
|
||||
update(client);
|
||||
};
|
||||
|
||||
m_connections[client] = connect(client->surface(), &SurfaceInterface::inhibitsIdleChanged, this, updateInhibit);
|
||||
connect(client, &ShellClient::desktopChanged, this, updateInhibit);
|
||||
connect(client, &ShellClient::clientMinimized, this, updateInhibit);
|
||||
connect(client, &ShellClient::clientUnminimized, this, updateInhibit);
|
||||
connect(client, &ShellClient::windowHidden, this, updateInhibit);
|
||||
connect(client, &ShellClient::windowShown, this, updateInhibit);
|
||||
connect(client, &ShellClient::windowClosed, this,
|
||||
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,
|
||||
[this, client] {
|
||||
uninhibit(client);
|
||||
auto it = m_connections.find(client);
|
||||
|
|
|
@ -37,7 +37,7 @@ using KWayland::Server::IdleInterface;
|
|||
namespace KWin
|
||||
{
|
||||
class AbstractClient;
|
||||
class ShellClient;
|
||||
class XdgShellClient;
|
||||
|
||||
class IdleInhibition : public QObject
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
explicit IdleInhibition(IdleInterface *idle);
|
||||
~IdleInhibition() override;
|
||||
|
||||
void registerShellClient(ShellClient *client);
|
||||
void registerXdgShellClient(XdgShellClient *client);
|
||||
|
||||
bool isInhibited() const {
|
||||
return !m_idleInhibitors.isEmpty();
|
||||
|
|
|
@ -43,7 +43,7 @@ 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 "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "xwl/xwayland_interface.h"
|
||||
#include "internal_client.h"
|
||||
|
|
|
@ -93,7 +93,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "composite.h"
|
||||
#include "screenedge.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
#include "internal_client.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace KWin
|
|||
class DrmBackend;
|
||||
class DrmOutput;
|
||||
class DrmBuffer;
|
||||
class ShellClient;
|
||||
class XdgShellClient;
|
||||
|
||||
/**
|
||||
* @brief OpenGL Backend using Egl with an EGLDevice.
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "input_event_spy.h"
|
||||
#include "osd.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_cursor_theme.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
#include "popup_input_filter.h"
|
||||
#include "deleted.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
namespace KWin
|
||||
{
|
||||
class Toplevel;
|
||||
class ShellClient;
|
||||
class XdgShellClient;
|
||||
|
||||
class PopupInputFilter : public QObject, public InputEventFilter
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "client.h"
|
||||
#include "screens.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
|
||||
namespace KWin {
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "../client.h"
|
||||
#include "../outline.h"
|
||||
#include "../screens.h"
|
||||
#include "../shell_client.h"
|
||||
#include "../xdgshellclient.h"
|
||||
#include "../virtualdesktops.h"
|
||||
#include "../wayland_server.h"
|
||||
#include "../workspace.h"
|
||||
|
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "composite.h"
|
||||
#include "effects.h"
|
||||
#include "workspace.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "wayland_server.h"
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
|
|
|
@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "effects.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "scripting/scripting.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#include "xkb.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "composite.h"
|
||||
#include "idle_inhibition.h"
|
||||
#include "screens.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "workspace.h"
|
||||
|
||||
// Client
|
||||
|
@ -157,7 +157,7 @@ void WaylandServer::createSurface(T *surface)
|
|||
if (surface->client() == m_screenLockerClientConnection) {
|
||||
ScreenLocker::KSldApp::self()->lockScreenShown();
|
||||
}
|
||||
ShellClient *client = new ShellClient(surface);
|
||||
XdgShellClient *client = new XdgShellClient(surface);
|
||||
if (ServerSideDecorationInterface *deco = ServerSideDecorationInterface::get(surface->surface())) {
|
||||
client->installServerSideDecoration(deco);
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ void WaylandServer::createSurface(T *surface)
|
|||
if (client->readyForPainting()) {
|
||||
emit shellClientAdded(client);
|
||||
} else {
|
||||
connect(client, &ShellClient::windowShown, this, &WaylandServer::shellClientShown);
|
||||
connect(client, &XdgShellClient::windowShown, this, &WaylandServer::shellClientShown);
|
||||
}
|
||||
|
||||
//not directly connected as the connection is tied to client instead of this
|
||||
|
@ -325,7 +325,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 (ShellClient *client = findClient(deco->surface()->surface())) {
|
||||
if (XdgShellClient *client = findClient(deco->surface()->surface())) {
|
||||
client->installXdgDecoration(deco);
|
||||
}
|
||||
});
|
||||
|
@ -340,13 +340,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::registerShellClient);
|
||||
connect(this, &WaylandServer::shellClientAdded, idleInhibition, &IdleInhibition::registerXdgShellClient);
|
||||
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 (ShellClient *client = findClient(surface->surface())) {
|
||||
if (XdgShellClient *client = findClient(surface->surface())) {
|
||||
client->installPlasmaShellSurface(surface);
|
||||
} else {
|
||||
m_plasmaShellSurfaces << surface;
|
||||
|
@ -362,7 +362,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
|
|||
m_appMenuManager->create();
|
||||
connect(m_appMenuManager, &AppMenuManagerInterface::appMenuCreated,
|
||||
[this] (AppMenuInterface *appMenu) {
|
||||
if (ShellClient *client = findClient(appMenu->surface())) {
|
||||
if (XdgShellClient *client = findClient(appMenu->surface())) {
|
||||
client->installAppMenu(appMenu);
|
||||
}
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
|
|||
m_paletteManager->create();
|
||||
connect(m_paletteManager, &ServerSideDecorationPaletteManagerInterface::paletteCreated,
|
||||
[this] (ServerSideDecorationPaletteInterface *palette) {
|
||||
if (ShellClient *client = findClient(palette->surface())) {
|
||||
if (XdgShellClient *client = findClient(palette->surface())) {
|
||||
client->installPalette(palette);
|
||||
}
|
||||
}
|
||||
|
@ -417,7 +417,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 (ShellClient *c = findClient(deco->surface())) {
|
||||
if (XdgShellClient *c = findClient(deco->surface())) {
|
||||
c->installServerSideDecoration(deco);
|
||||
}
|
||||
connect(deco, &ServerSideDecorationInterface::modeRequested, this,
|
||||
|
@ -458,12 +458,12 @@ SurfaceInterface *WaylandServer::findForeignTransientForSurface(SurfaceInterface
|
|||
|
||||
void WaylandServer::shellClientShown(Toplevel *t)
|
||||
{
|
||||
ShellClient *c = dynamic_cast<ShellClient*>(t);
|
||||
XdgShellClient *c = dynamic_cast<XdgShellClient *>(t);
|
||||
if (!c) {
|
||||
qCWarning(KWIN_CORE) << "Failed to cast a Toplevel which is supposed to be a ShellClient to ShellClient";
|
||||
qCWarning(KWIN_CORE) << "Failed to cast a Toplevel which is supposed to be a XdgShellClient to XdgShellClient";
|
||||
return;
|
||||
}
|
||||
disconnect(c, &ShellClient::windowShown, this, &WaylandServer::shellClientShown);
|
||||
disconnect(c, &XdgShellClient::windowShown, this, &WaylandServer::shellClientShown);
|
||||
emit shellClientAdded(c);
|
||||
}
|
||||
|
||||
|
@ -627,7 +627,7 @@ void WaylandServer::createInternalConnection()
|
|||
m_internalConnection.client->initConnection();
|
||||
}
|
||||
|
||||
void WaylandServer::removeClient(ShellClient *c)
|
||||
void WaylandServer::removeClient(XdgShellClient *c)
|
||||
{
|
||||
m_clients.removeAll(c);
|
||||
emit shellClientRemoved(c);
|
||||
|
@ -644,10 +644,10 @@ void WaylandServer::dispatch()
|
|||
m_display->dispatchEvents(0);
|
||||
}
|
||||
|
||||
static ShellClient *findClientInList(const QList<ShellClient*> &clients, quint32 id)
|
||||
static XdgShellClient *findClientInList(const QList<XdgShellClient *> &clients, quint32 id)
|
||||
{
|
||||
auto it = std::find_if(clients.begin(), clients.end(),
|
||||
[id] (ShellClient *c) {
|
||||
[id] (XdgShellClient *c) {
|
||||
return c->windowId() == id;
|
||||
}
|
||||
);
|
||||
|
@ -657,10 +657,10 @@ static ShellClient *findClientInList(const QList<ShellClient*> &clients, quint32
|
|||
return *it;
|
||||
}
|
||||
|
||||
static ShellClient *findClientInList(const QList<ShellClient*> &clients, KWayland::Server::SurfaceInterface *surface)
|
||||
static XdgShellClient *findClientInList(const QList<XdgShellClient *> &clients, KWayland::Server::SurfaceInterface *surface)
|
||||
{
|
||||
auto it = std::find_if(clients.begin(), clients.end(),
|
||||
[surface] (ShellClient *c) {
|
||||
[surface] (XdgShellClient *c) {
|
||||
return c->surface() == surface;
|
||||
}
|
||||
);
|
||||
|
@ -670,23 +670,23 @@ static ShellClient *findClientInList(const QList<ShellClient*> &clients, KWaylan
|
|||
return *it;
|
||||
}
|
||||
|
||||
ShellClient *WaylandServer::findClient(quint32 id) const
|
||||
XdgShellClient *WaylandServer::findClient(quint32 id) const
|
||||
{
|
||||
if (id == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
if (ShellClient *c = findClientInList(m_clients, id)) {
|
||||
if (XdgShellClient *c = findClientInList(m_clients, id)) {
|
||||
return c;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ShellClient *WaylandServer::findClient(SurfaceInterface *surface) const
|
||||
XdgShellClient *WaylandServer::findClient(SurfaceInterface *surface) const
|
||||
{
|
||||
if (!surface) {
|
||||
return nullptr;
|
||||
}
|
||||
if (ShellClient *c = findClientInList(m_clients, surface)) {
|
||||
if (XdgShellClient *c = findClientInList(m_clients, surface)) {
|
||||
return c;
|
||||
}
|
||||
return nullptr;
|
||||
|
|
|
@ -72,7 +72,7 @@ class KeyStateInterface;
|
|||
|
||||
namespace KWin
|
||||
{
|
||||
class ShellClient;
|
||||
class XdgShellClient;
|
||||
|
||||
class AbstractClient;
|
||||
class Toplevel;
|
||||
|
@ -119,12 +119,12 @@ public:
|
|||
return m_xdgOutputManager;
|
||||
}
|
||||
|
||||
QList<ShellClient*> clients() const {
|
||||
QList<XdgShellClient *> clients() const {
|
||||
return m_clients;
|
||||
}
|
||||
void removeClient(ShellClient *c);
|
||||
ShellClient *findClient(quint32 id) const;
|
||||
ShellClient *findClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
void removeClient(XdgShellClient *c);
|
||||
XdgShellClient *findClient(quint32 id) const;
|
||||
XdgShellClient *findClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
AbstractClient *findAbstractClient(KWayland::Server::SurfaceInterface *surface) const;
|
||||
|
||||
/**
|
||||
|
@ -217,8 +217,8 @@ public:
|
|||
void updateKeyState(KWin::Xkb::LEDs leds);
|
||||
|
||||
Q_SIGNALS:
|
||||
void shellClientAdded(KWin::ShellClient*);
|
||||
void shellClientRemoved(KWin::ShellClient*);
|
||||
void shellClientAdded(KWin::XdgShellClient *);
|
||||
void shellClientRemoved(KWin::XdgShellClient *);
|
||||
void terminatingInternalClientConnection();
|
||||
void initialized();
|
||||
void foreignTransientChanged(KWayland::Server::SurfaceInterface *child);
|
||||
|
@ -266,7 +266,7 @@ private:
|
|||
} m_internalConnection;
|
||||
KWayland::Server::XdgForeignInterface *m_XdgForeign = nullptr;
|
||||
KWayland::Server::KeyStateInterface *m_keyState = nullptr;
|
||||
QList<ShellClient*> m_clients;
|
||||
QList<XdgShellClient *> m_clients;
|
||||
QHash<KWayland::Server::ClientConnection*, quint16> m_clientIds;
|
||||
InitalizationFlags m_initFlags;
|
||||
QVector<KWayland::Server::PlasmaShellSurfaceInterface*> m_plasmaShellSurfaces;
|
||||
|
|
|
@ -56,7 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "unmanaged.h"
|
||||
#include "useractions.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "was_user_interaction_x11_filter.h"
|
||||
#include "wayland_server.h"
|
||||
#include "xcbutils.h"
|
||||
|
@ -291,7 +291,7 @@ void Workspace::init()
|
|||
|
||||
if (auto w = waylandServer()) {
|
||||
connect(w, &WaylandServer::shellClientAdded, this,
|
||||
[this] (ShellClient *c) {
|
||||
[this] (XdgShellClient *c) {
|
||||
setupClientConnections(c);
|
||||
c->updateDecoration(false);
|
||||
updateClientLayer(c);
|
||||
|
@ -326,7 +326,7 @@ void Workspace::init()
|
|||
activateClient(c);
|
||||
}
|
||||
updateTabbox();
|
||||
connect(c, &ShellClient::windowShown, this,
|
||||
connect(c, &XdgShellClient::windowShown, this,
|
||||
[this, c] {
|
||||
updateClientLayer(c);
|
||||
// TODO: when else should we send the client through placement?
|
||||
|
@ -342,7 +342,7 @@ void Workspace::init()
|
|||
}
|
||||
}
|
||||
);
|
||||
connect(c, &ShellClient::windowHidden, this,
|
||||
connect(c, &XdgShellClient::windowHidden, this,
|
||||
[this] {
|
||||
// TODO: update tabbox if it's displayed
|
||||
markXStackingOrderAsDirty();
|
||||
|
@ -353,7 +353,7 @@ void Workspace::init()
|
|||
}
|
||||
);
|
||||
connect(w, &WaylandServer::shellClientRemoved, this,
|
||||
[this] (ShellClient *c) {
|
||||
[this] (XdgShellClient *c) {
|
||||
m_allClients.removeAll(c);
|
||||
if (c == most_recently_raised) {
|
||||
most_recently_raised = nullptr;
|
||||
|
@ -560,8 +560,8 @@ Workspace::~Workspace()
|
|||
Client::cleanupX11();
|
||||
|
||||
if (waylandServer()) {
|
||||
const QList<ShellClient *> shellClients = waylandServer()->clients();
|
||||
for (ShellClient *shellClient : shellClients) {
|
||||
const QList<XdgShellClient *> shellClients = waylandServer()->clients();
|
||||
for (XdgShellClient *shellClient : shellClients) {
|
||||
shellClient->destroyClient();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ public:
|
|||
* @brief Finds a Toplevel for the internal window @p w.
|
||||
*
|
||||
* Internal window means a window created by KWin itself. On X11 this is an Unmanaged
|
||||
* and mapped by the window id, on Wayland a ShellClient mapped on the internal window id.
|
||||
* and mapped by the window id, on Wayland a XdgShellClient mapped on the internal window id.
|
||||
*
|
||||
* @returns Toplevel
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@ 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 "shell_client.h"
|
||||
#include "xdgshellclient.h"
|
||||
#include "composite.h"
|
||||
#include "cursor.h"
|
||||
#include "deleted.h"
|
||||
|
@ -66,7 +66,7 @@ using namespace KWayland::Server;
|
|||
namespace KWin
|
||||
{
|
||||
|
||||
ShellClient::ShellClient(XdgShellSurfaceInterface *surface)
|
||||
XdgShellClient::XdgShellClient(XdgShellSurfaceInterface *surface)
|
||||
: AbstractClient()
|
||||
, m_xdgShellSurface(surface)
|
||||
, m_xdgShellPopup(nullptr)
|
||||
|
@ -74,10 +74,10 @@ ShellClient::ShellClient(XdgShellSurfaceInterface *surface)
|
|||
setSurface(surface->surface());
|
||||
m_requestGeometryBlockCounter++;
|
||||
init();
|
||||
connect(surface->surface(), &SurfaceInterface::committed, this, &ShellClient::finishInit);
|
||||
connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
|
||||
}
|
||||
|
||||
ShellClient::ShellClient(XdgShellPopupInterface *surface)
|
||||
XdgShellClient::XdgShellClient(XdgShellPopupInterface *surface)
|
||||
: AbstractClient()
|
||||
, m_xdgShellSurface(nullptr)
|
||||
, m_xdgShellPopup(surface)
|
||||
|
@ -85,18 +85,18 @@ ShellClient::ShellClient(XdgShellPopupInterface *surface)
|
|||
setSurface(surface->surface());
|
||||
m_requestGeometryBlockCounter++;
|
||||
init();
|
||||
connect(surface->surface(), &SurfaceInterface::committed, this, &ShellClient::finishInit);
|
||||
connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
|
||||
}
|
||||
|
||||
ShellClient::~ShellClient() = default;
|
||||
XdgShellClient::~XdgShellClient() = default;
|
||||
|
||||
template <class T>
|
||||
void ShellClient::initSurface(T *shellSurface)
|
||||
void XdgShellClient::initSurface(T *shellSurface)
|
||||
{
|
||||
m_caption = shellSurface->title().simplified();
|
||||
// delay till end of init
|
||||
QTimer::singleShot(0, this, &ShellClient::updateCaption);
|
||||
connect(shellSurface, &T::destroyed, this, &ShellClient::destroyClient);
|
||||
QTimer::singleShot(0, this, &XdgShellClient::updateCaption);
|
||||
connect(shellSurface, &T::destroyed, this, &XdgShellClient::destroyClient);
|
||||
connect(shellSurface, &T::titleChanged, this,
|
||||
[this] (const QString &s) {
|
||||
const auto oldSuffix = m_captionSuffix;
|
||||
|
@ -181,17 +181,17 @@ void ShellClient::initSurface(T *shellSurface)
|
|||
}
|
||||
);
|
||||
// TODO: consider output!
|
||||
connect(shellSurface, &T::fullscreenChanged, this, &ShellClient::clientFullScreenChanged);
|
||||
connect(shellSurface, &T::fullscreenChanged, this, &XdgShellClient::clientFullScreenChanged);
|
||||
|
||||
connect(shellSurface, &T::transientForChanged, this, &ShellClient::setTransient);
|
||||
connect(shellSurface, &T::transientForChanged, this, &XdgShellClient::setTransient);
|
||||
|
||||
connect(this, &ShellClient::geometryChanged, this, &ShellClient::updateClientOutputs);
|
||||
connect(screens(), &Screens::changed, this, &ShellClient::updateClientOutputs);
|
||||
connect(this, &XdgShellClient::geometryChanged, this, &XdgShellClient::updateClientOutputs);
|
||||
connect(screens(), &Screens::changed, this, &XdgShellClient::updateClientOutputs);
|
||||
}
|
||||
|
||||
void ShellClient::init()
|
||||
void XdgShellClient::init()
|
||||
{
|
||||
connect(this, &ShellClient::desktopFileNameChanged, this, &ShellClient::updateIcon);
|
||||
connect(this, &XdgShellClient::desktopFileNameChanged, this, &XdgShellClient::updateIcon);
|
||||
createWindowId();
|
||||
setupCompositing();
|
||||
updateIcon();
|
||||
|
@ -209,9 +209,9 @@ void ShellClient::init()
|
|||
doSetGeometry(QRect(pos(), m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom())));
|
||||
}
|
||||
);
|
||||
connect(s, &SurfaceInterface::unmapped, this, &ShellClient::unmap);
|
||||
connect(s, &SurfaceInterface::unbound, this, &ShellClient::destroyClient);
|
||||
connect(s, &SurfaceInterface::destroyed, this, &ShellClient::destroyClient);
|
||||
connect(s, &SurfaceInterface::unmapped, this, &XdgShellClient::unmap);
|
||||
connect(s, &SurfaceInterface::unbound, this, &XdgShellClient::destroyClient);
|
||||
connect(s, &SurfaceInterface::destroyed, this, &XdgShellClient::destroyClient);
|
||||
if (m_xdgShellSurface) {
|
||||
initSurface(m_xdgShellSurface);
|
||||
|
||||
|
@ -293,7 +293,7 @@ void ShellClient::init()
|
|||
m_lastAckedConfigureRequest = serial;
|
||||
});
|
||||
|
||||
connect(m_xdgShellPopup, &XdgShellPopupInterface::destroyed, this, &ShellClient::destroyClient);
|
||||
connect(m_xdgShellPopup, &XdgShellPopupInterface::destroyed, this, &XdgShellClient::destroyClient);
|
||||
}
|
||||
|
||||
// set initial desktop
|
||||
|
@ -313,9 +313,9 @@ void ShellClient::init()
|
|||
AbstractClient::updateColorScheme(QString());
|
||||
}
|
||||
|
||||
void ShellClient::finishInit() {
|
||||
void XdgShellClient::finishInit() {
|
||||
SurfaceInterface *s = surface();
|
||||
disconnect(s, &SurfaceInterface::committed, this, &ShellClient::finishInit);
|
||||
disconnect(s, &SurfaceInterface::committed, this, &XdgShellClient::finishInit);
|
||||
|
||||
bool needsPlacement = !isInitialPositionSet();
|
||||
|
||||
|
@ -371,7 +371,7 @@ void ShellClient::finishInit() {
|
|||
m_isInitialized = true;
|
||||
}
|
||||
|
||||
void ShellClient::destroyClient()
|
||||
void XdgShellClient::destroyClient()
|
||||
{
|
||||
m_closing = true;
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
|
@ -416,12 +416,12 @@ void ShellClient::destroyClient()
|
|||
deleteClient(this);
|
||||
}
|
||||
|
||||
void ShellClient::deleteClient(ShellClient *c)
|
||||
void XdgShellClient::deleteClient(XdgShellClient *c)
|
||||
{
|
||||
delete c;
|
||||
}
|
||||
|
||||
QSize ShellClient::toWindowGeometry(const QSize &size) const
|
||||
QSize XdgShellClient::toWindowGeometry(const QSize &size) const
|
||||
{
|
||||
QSize adjustedSize = size - QSize(borderLeft() + borderRight(), borderTop() + borderBottom());
|
||||
// a client going fullscreen should have the window the contents size of the screen
|
||||
|
@ -431,35 +431,35 @@ QSize ShellClient::toWindowGeometry(const QSize &size) const
|
|||
return adjustedSize;
|
||||
}
|
||||
|
||||
QStringList ShellClient::activities() const
|
||||
QStringList XdgShellClient::activities() const
|
||||
{
|
||||
// TODO: implement
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
QPoint ShellClient::clientContentPos() const
|
||||
QPoint XdgShellClient::clientContentPos() const
|
||||
{
|
||||
return -1 * clientPos();
|
||||
}
|
||||
|
||||
QSize ShellClient::clientSize() const
|
||||
QSize XdgShellClient::clientSize() const
|
||||
{
|
||||
return m_clientSize;
|
||||
}
|
||||
|
||||
void ShellClient::debug(QDebug &stream) const
|
||||
void XdgShellClient::debug(QDebug &stream) const
|
||||
{
|
||||
stream.nospace();
|
||||
stream << "\'ShellClient:" << surface() << ";WMCLASS:" << resourceClass() << ":"
|
||||
stream << "\'XdgShellClient:" << surface() << ";WMCLASS:" << resourceClass() << ":"
|
||||
<< resourceName() << ";Caption:" << caption() << "\'";
|
||||
}
|
||||
|
||||
bool ShellClient::belongsToDesktop() const
|
||||
bool XdgShellClient::belongsToDesktop() const
|
||||
{
|
||||
const auto clients = waylandServer()->clients();
|
||||
|
||||
return std::any_of(clients.constBegin(), clients.constEnd(),
|
||||
[this](const ShellClient *client) {
|
||||
[this](const XdgShellClient *client) {
|
||||
if (belongsToSameApplication(client, SameApplicationChecks())) {
|
||||
return client->isDesktop();
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ bool ShellClient::belongsToDesktop() const
|
|||
);
|
||||
}
|
||||
|
||||
Layer ShellClient::layerForDock() const
|
||||
Layer XdgShellClient::layerForDock() const
|
||||
{
|
||||
if (m_plasmaShellSurface) {
|
||||
switch (m_plasmaShellSurface->panelBehavior()) {
|
||||
|
@ -487,13 +487,13 @@ Layer ShellClient::layerForDock() const
|
|||
return AbstractClient::layerForDock();
|
||||
}
|
||||
|
||||
QRect ShellClient::transparentRect() const
|
||||
QRect XdgShellClient::transparentRect() const
|
||||
{
|
||||
// TODO: implement
|
||||
return QRect();
|
||||
}
|
||||
|
||||
NET::WindowType ShellClient::windowType(bool direct, int supported_types) const
|
||||
NET::WindowType XdgShellClient::windowType(bool direct, int supported_types) const
|
||||
{
|
||||
// TODO: implement
|
||||
Q_UNUSED(direct)
|
||||
|
@ -501,12 +501,12 @@ NET::WindowType ShellClient::windowType(bool direct, int supported_types) const
|
|||
return m_windowType;
|
||||
}
|
||||
|
||||
double ShellClient::opacity() const
|
||||
double XdgShellClient::opacity() const
|
||||
{
|
||||
return m_opacity;
|
||||
}
|
||||
|
||||
void ShellClient::setOpacity(double opacity)
|
||||
void XdgShellClient::setOpacity(double opacity)
|
||||
{
|
||||
const qreal newOpacity = qBound(0.0, opacity, 1.0);
|
||||
if (newOpacity == m_opacity) {
|
||||
|
@ -518,7 +518,7 @@ void ShellClient::setOpacity(double opacity)
|
|||
emit opacityChanged(this, oldOpacity);
|
||||
}
|
||||
|
||||
void ShellClient::addDamage(const QRegion &damage)
|
||||
void XdgShellClient::addDamage(const QRegion &damage)
|
||||
{
|
||||
auto s = surface();
|
||||
if (s->size().isValid()) {
|
||||
|
@ -532,7 +532,7 @@ void ShellClient::addDamage(const QRegion &damage)
|
|||
Toplevel::addDamage(damage);
|
||||
}
|
||||
|
||||
void ShellClient::markAsMapped()
|
||||
void XdgShellClient::markAsMapped()
|
||||
{
|
||||
if (!m_unmapped) {
|
||||
return;
|
||||
|
@ -551,7 +551,7 @@ void ShellClient::markAsMapped()
|
|||
updateShowOnScreenEdge();
|
||||
}
|
||||
|
||||
void ShellClient::createDecoration(const QRect &oldGeom)
|
||||
void XdgShellClient::createDecoration(const QRect &oldGeom)
|
||||
{
|
||||
KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this);
|
||||
if (decoration) {
|
||||
|
@ -576,7 +576,7 @@ void ShellClient::createDecoration(const QRect &oldGeom)
|
|||
emit geometryShapeChanged(this, oldGeom);
|
||||
}
|
||||
|
||||
void ShellClient::updateDecoration(bool check_workspace_pos, bool force)
|
||||
void XdgShellClient::updateDecoration(bool check_workspace_pos, bool force)
|
||||
{
|
||||
if (!force &&
|
||||
((!isDecorated() && noBorder()) || (isDecorated() && !noBorder())))
|
||||
|
@ -606,7 +606,7 @@ void ShellClient::updateDecoration(bool check_workspace_pos, bool force)
|
|||
blockGeometryUpdates(false);
|
||||
}
|
||||
|
||||
void ShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
|
||||
void XdgShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
|
||||
{
|
||||
const QRect newGeometry = rules()->checkGeometry(QRect(x, y, w, h));
|
||||
|
||||
|
@ -640,7 +640,7 @@ void ShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
|
|||
}
|
||||
}
|
||||
|
||||
void ShellClient::doSetGeometry(const QRect &rect)
|
||||
void XdgShellClient::doSetGeometry(const QRect &rect)
|
||||
{
|
||||
if (geom == rect && pendingGeometryUpdate() == PendingGeometryNone) {
|
||||
return;
|
||||
|
@ -672,12 +672,12 @@ void ShellClient::doSetGeometry(const QRect &rect)
|
|||
}
|
||||
}
|
||||
|
||||
QByteArray ShellClient::windowRole() const
|
||||
QByteArray XdgShellClient::windowRole() const
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
bool ShellClient::belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const
|
||||
bool XdgShellClient::belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const
|
||||
{
|
||||
if (checks.testFlag(SameApplicationCheck::AllowCrossProcesses)) {
|
||||
if (other->desktopFileName() == desktopFileName()) {
|
||||
|
@ -690,12 +690,12 @@ bool ShellClient::belongsToSameApplication(const AbstractClient *other, SameAppl
|
|||
return false;
|
||||
}
|
||||
|
||||
void ShellClient::blockActivityUpdates(bool b)
|
||||
void XdgShellClient::blockActivityUpdates(bool b)
|
||||
{
|
||||
Q_UNUSED(b)
|
||||
}
|
||||
|
||||
void ShellClient::updateCaption()
|
||||
void XdgShellClient::updateCaption()
|
||||
{
|
||||
const QString oldSuffix = m_captionSuffix;
|
||||
const auto shortcut = shortcutCaptionSuffix();
|
||||
|
@ -712,7 +712,7 @@ void ShellClient::updateCaption()
|
|||
}
|
||||
}
|
||||
|
||||
void ShellClient::closeWindow()
|
||||
void XdgShellClient::closeWindow()
|
||||
{
|
||||
if (m_xdgShellSurface && isCloseable()) {
|
||||
m_xdgShellSurface->close();
|
||||
|
@ -721,13 +721,13 @@ void ShellClient::closeWindow()
|
|||
}
|
||||
}
|
||||
|
||||
AbstractClient *ShellClient::findModal(bool allow_itself)
|
||||
AbstractClient *XdgShellClient::findModal(bool allow_itself)
|
||||
{
|
||||
Q_UNUSED(allow_itself)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool ShellClient::isCloseable() const
|
||||
bool XdgShellClient::isCloseable() const
|
||||
{
|
||||
if (m_windowType == NET::Desktop || m_windowType == NET::Dock) {
|
||||
return false;
|
||||
|
@ -738,12 +738,12 @@ bool ShellClient::isCloseable() const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ShellClient::isFullScreen() const
|
||||
bool XdgShellClient::isFullScreen() const
|
||||
{
|
||||
return m_fullScreen;
|
||||
}
|
||||
|
||||
bool ShellClient::isMaximizable() const
|
||||
bool XdgShellClient::isMaximizable() const
|
||||
{
|
||||
if (!isResizable()) {
|
||||
return false;
|
||||
|
@ -754,7 +754,7 @@ bool ShellClient::isMaximizable() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ShellClient::isMinimizable() const
|
||||
bool XdgShellClient::isMinimizable() const
|
||||
{
|
||||
if (!rules()->checkMinimize(true)) {
|
||||
return false;
|
||||
|
@ -762,7 +762,7 @@ bool ShellClient::isMinimizable() const
|
|||
return (!m_plasmaShellSurface || m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Normal);
|
||||
}
|
||||
|
||||
bool ShellClient::isMovable() const
|
||||
bool XdgShellClient::isMovable() const
|
||||
{
|
||||
if (rules()->checkPosition(invalidPoint) != invalidPoint) {
|
||||
return false;
|
||||
|
@ -776,7 +776,7 @@ bool ShellClient::isMovable() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ShellClient::isMovableAcrossScreens() const
|
||||
bool XdgShellClient::isMovableAcrossScreens() const
|
||||
{
|
||||
if (rules()->checkPosition(invalidPoint) != invalidPoint) {
|
||||
return false;
|
||||
|
@ -790,7 +790,7 @@ bool ShellClient::isMovableAcrossScreens() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ShellClient::isResizable() const
|
||||
bool XdgShellClient::isResizable() const
|
||||
{
|
||||
if (rules()->checkSize(QSize()).isValid()) {
|
||||
return false;
|
||||
|
@ -804,13 +804,13 @@ bool ShellClient::isResizable() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ShellClient::isShown(bool shaded_is_shown) const
|
||||
bool XdgShellClient::isShown(bool shaded_is_shown) const
|
||||
{
|
||||
Q_UNUSED(shaded_is_shown)
|
||||
return !m_closing && !m_unmapped && !isMinimized() && !m_hidden;
|
||||
}
|
||||
|
||||
void ShellClient::hideClient(bool hide)
|
||||
void XdgShellClient::hideClient(bool hide)
|
||||
{
|
||||
if (m_hidden == hide) {
|
||||
return;
|
||||
|
@ -826,7 +826,7 @@ void ShellClient::hideClient(bool hide)
|
|||
}
|
||||
|
||||
static bool changeMaximizeRecursion = false;
|
||||
void ShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust)
|
||||
void XdgShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust)
|
||||
{
|
||||
if (changeMaximizeRecursion) {
|
||||
return;
|
||||
|
@ -927,17 +927,17 @@ void ShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust)
|
|||
}
|
||||
}
|
||||
|
||||
MaximizeMode ShellClient::maximizeMode() const
|
||||
MaximizeMode XdgShellClient::maximizeMode() const
|
||||
{
|
||||
return m_maximizeMode;
|
||||
}
|
||||
|
||||
MaximizeMode ShellClient::requestedMaximizeMode() const
|
||||
MaximizeMode XdgShellClient::requestedMaximizeMode() const
|
||||
{
|
||||
return m_requestedMaximizeMode;
|
||||
}
|
||||
|
||||
bool ShellClient::noBorder() const
|
||||
bool XdgShellClient::noBorder() const
|
||||
{
|
||||
if (m_serverDecoration) {
|
||||
if (m_serverDecoration->mode() == ServerSideDecorationManagerInterface::Mode::Server) {
|
||||
|
@ -950,7 +950,7 @@ bool ShellClient::noBorder() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ShellClient::isFullScreenable() const
|
||||
bool XdgShellClient::isFullScreenable() const
|
||||
{
|
||||
if (!rules()->checkFullScreen(true)) {
|
||||
return false;
|
||||
|
@ -958,7 +958,7 @@ bool ShellClient::isFullScreenable() const
|
|||
return !isSpecialWindow();
|
||||
}
|
||||
|
||||
void ShellClient::setFullScreen(bool set, bool user)
|
||||
void XdgShellClient::setFullScreen(bool set, bool user)
|
||||
{
|
||||
set = rules()->checkFullScreen(set);
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ void ShellClient::setFullScreen(bool set, bool user)
|
|||
emit fullScreenChanged();
|
||||
}
|
||||
|
||||
void ShellClient::setNoBorder(bool set)
|
||||
void XdgShellClient::setNoBorder(bool set)
|
||||
{
|
||||
if (!userCanSetNoBorder()) {
|
||||
return;
|
||||
|
@ -1023,12 +1023,12 @@ void ShellClient::setNoBorder(bool set)
|
|||
updateWindowRules(Rules::NoBorder);
|
||||
}
|
||||
|
||||
void ShellClient::setOnAllActivities(bool set)
|
||||
void XdgShellClient::setOnAllActivities(bool set)
|
||||
{
|
||||
Q_UNUSED(set)
|
||||
}
|
||||
|
||||
void ShellClient::takeFocus()
|
||||
void XdgShellClient::takeFocus()
|
||||
{
|
||||
if (rules()->checkAcceptFocus(wantsInput())) {
|
||||
if (m_xdgShellSurface) {
|
||||
|
@ -1043,7 +1043,7 @@ void ShellClient::takeFocus()
|
|||
}
|
||||
}
|
||||
|
||||
void ShellClient::doSetActive()
|
||||
void XdgShellClient::doSetActive()
|
||||
{
|
||||
if (!isActive()) {
|
||||
return;
|
||||
|
@ -1052,7 +1052,7 @@ void ShellClient::doSetActive()
|
|||
workspace()->focusToNull();
|
||||
}
|
||||
|
||||
bool ShellClient::userCanSetFullScreen() const
|
||||
bool XdgShellClient::userCanSetFullScreen() const
|
||||
{
|
||||
if (m_xdgShellSurface) {
|
||||
return true;
|
||||
|
@ -1060,7 +1060,7 @@ bool ShellClient::userCanSetFullScreen() const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ShellClient::userCanSetNoBorder() const
|
||||
bool XdgShellClient::userCanSetNoBorder() const
|
||||
{
|
||||
if (m_serverDecoration && m_serverDecoration->mode() == ServerSideDecorationManagerInterface::Mode::Server) {
|
||||
return !isFullScreen() && !isShade();
|
||||
|
@ -1071,12 +1071,12 @@ bool ShellClient::userCanSetNoBorder() const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ShellClient::wantsInput() const
|
||||
bool XdgShellClient::wantsInput() const
|
||||
{
|
||||
return rules()->checkAcceptFocus(acceptsFocus());
|
||||
}
|
||||
|
||||
bool ShellClient::acceptsFocus() const
|
||||
bool XdgShellClient::acceptsFocus() const
|
||||
{
|
||||
if (waylandServer()->inputMethodConnection() == surface()->client()) {
|
||||
return false;
|
||||
|
@ -1104,27 +1104,27 @@ bool ShellClient::acceptsFocus() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void ShellClient::createWindowId()
|
||||
void XdgShellClient::createWindowId()
|
||||
{
|
||||
m_windowId = waylandServer()->createWindowId(surface());
|
||||
}
|
||||
|
||||
pid_t ShellClient::pid() const
|
||||
pid_t XdgShellClient::pid() const
|
||||
{
|
||||
return surface()->client()->processId();
|
||||
}
|
||||
|
||||
bool ShellClient::isLockScreen() const
|
||||
bool XdgShellClient::isLockScreen() const
|
||||
{
|
||||
return surface()->client() == waylandServer()->screenLockerClientConnection();
|
||||
}
|
||||
|
||||
bool ShellClient::isInputMethod() const
|
||||
bool XdgShellClient::isInputMethod() const
|
||||
{
|
||||
return surface()->client() == waylandServer()->inputMethodConnection();
|
||||
}
|
||||
|
||||
void ShellClient::requestGeometry(const QRect &rect)
|
||||
void XdgShellClient::requestGeometry(const QRect &rect)
|
||||
{
|
||||
if (m_requestGeometryBlockCounter != 0) {
|
||||
m_blockedRequestGeometry = rect;
|
||||
|
@ -1164,7 +1164,7 @@ void ShellClient::requestGeometry(const QRect &rect)
|
|||
m_blockedRequestGeometry = QRect();
|
||||
}
|
||||
|
||||
void ShellClient::updatePendingGeometry()
|
||||
void XdgShellClient::updatePendingGeometry()
|
||||
{
|
||||
QPoint position = pos();
|
||||
MaximizeMode maximizeMode = m_maximizeMode;
|
||||
|
@ -1189,12 +1189,12 @@ void ShellClient::updatePendingGeometry()
|
|||
updateMaximizeMode(maximizeMode);
|
||||
}
|
||||
|
||||
void ShellClient::clientFullScreenChanged(bool fullScreen)
|
||||
void XdgShellClient::clientFullScreenChanged(bool fullScreen)
|
||||
{
|
||||
setFullScreen(fullScreen, false);
|
||||
}
|
||||
|
||||
void ShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force)
|
||||
void XdgShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force)
|
||||
{
|
||||
Q_UNUSED(force)
|
||||
QRect area = workspace()->clientArea(WorkArea, this);
|
||||
|
@ -1210,7 +1210,7 @@ void ShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force)
|
|||
}
|
||||
}
|
||||
|
||||
void ShellClient::unmap()
|
||||
void XdgShellClient::unmap()
|
||||
{
|
||||
m_unmapped = true;
|
||||
if (isMoveResize()) {
|
||||
|
@ -1225,7 +1225,7 @@ void ShellClient::unmap()
|
|||
emit windowHidden(this);
|
||||
}
|
||||
|
||||
void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface)
|
||||
void XdgShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface)
|
||||
{
|
||||
m_plasmaShellSurface = surface;
|
||||
auto updatePosition = [this, surface] {
|
||||
|
@ -1291,7 +1291,7 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface
|
|||
updatePosition();
|
||||
updateRole();
|
||||
updateShowOnScreenEdge();
|
||||
connect(this, &ShellClient::geometryChanged, this, &ShellClient::updateShowOnScreenEdge);
|
||||
connect(this, &XdgShellClient::geometryChanged, this, &XdgShellClient::updateShowOnScreenEdge);
|
||||
|
||||
setSkipTaskbar(surface->skipTaskbar());
|
||||
connect(surface, &PlasmaShellSurfaceInterface::skipTaskbarChanged, this, [this] {
|
||||
|
@ -1304,7 +1304,7 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface
|
|||
});
|
||||
}
|
||||
|
||||
void ShellClient::updateShowOnScreenEdge()
|
||||
void XdgShellClient::updateShowOnScreenEdge()
|
||||
{
|
||||
if (!ScreenEdges::self()) {
|
||||
return;
|
||||
|
@ -1378,7 +1378,7 @@ void ShellClient::updateShowOnScreenEdge()
|
|||
}
|
||||
}
|
||||
|
||||
bool ShellClient::isInitialPositionSet() const
|
||||
bool XdgShellClient::isInitialPositionSet() const
|
||||
{
|
||||
if (m_plasmaShellSurface) {
|
||||
return m_plasmaShellSurface->isPositionSet();
|
||||
|
@ -1386,7 +1386,7 @@ bool ShellClient::isInitialPositionSet() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void ShellClient::installAppMenu(AppMenuInterface *menu)
|
||||
void XdgShellClient::installAppMenu(AppMenuInterface *menu)
|
||||
{
|
||||
m_appMenuInterface = menu;
|
||||
|
||||
|
@ -1400,7 +1400,7 @@ void ShellClient::installAppMenu(AppMenuInterface *menu)
|
|||
updateMenu(menu->address());
|
||||
}
|
||||
|
||||
void ShellClient::installPalette(ServerSideDecorationPaletteInterface *palette)
|
||||
void XdgShellClient::installPalette(ServerSideDecorationPaletteInterface *palette)
|
||||
{
|
||||
m_paletteInterface = palette;
|
||||
|
||||
|
@ -1416,7 +1416,7 @@ void ShellClient::installPalette(ServerSideDecorationPaletteInterface *palette)
|
|||
updatePalette(palette->palette());
|
||||
}
|
||||
|
||||
void ShellClient::updateColorScheme()
|
||||
void XdgShellClient::updateColorScheme()
|
||||
{
|
||||
if (m_paletteInterface) {
|
||||
AbstractClient::updateColorScheme(rules()->checkDecoColor(m_paletteInterface->palette()));
|
||||
|
@ -1425,7 +1425,7 @@ void ShellClient::updateColorScheme()
|
|||
}
|
||||
}
|
||||
|
||||
void ShellClient::updateMaximizeMode(MaximizeMode maximizeMode)
|
||||
void XdgShellClient::updateMaximizeMode(MaximizeMode maximizeMode)
|
||||
{
|
||||
if (maximizeMode == m_maximizeMode) {
|
||||
return;
|
||||
|
@ -1438,7 +1438,7 @@ void ShellClient::updateMaximizeMode(MaximizeMode maximizeMode)
|
|||
emit clientMaximizedStateChanged(this, m_maximizeMode & MaximizeHorizontal, m_maximizeMode & MaximizeVertical);
|
||||
}
|
||||
|
||||
bool ShellClient::hasStrut() const
|
||||
bool XdgShellClient::hasStrut() const
|
||||
{
|
||||
if (!isShown(true)) {
|
||||
return false;
|
||||
|
@ -1452,7 +1452,7 @@ bool ShellClient::hasStrut() const
|
|||
return m_plasmaShellSurface->panelBehavior() == PlasmaShellSurfaceInterface::PanelBehavior::AlwaysVisible;
|
||||
}
|
||||
|
||||
void ShellClient::updateIcon()
|
||||
void XdgShellClient::updateIcon()
|
||||
{
|
||||
const QString waylandIconName = QStringLiteral("wayland");
|
||||
const QString dfIconName = iconFromDesktopFile();
|
||||
|
@ -1463,12 +1463,12 @@ void ShellClient::updateIcon()
|
|||
setIcon(QIcon::fromTheme(iconName));
|
||||
}
|
||||
|
||||
bool ShellClient::isTransient() const
|
||||
bool XdgShellClient::isTransient() const
|
||||
{
|
||||
return m_transient;
|
||||
}
|
||||
|
||||
void ShellClient::setTransient()
|
||||
void XdgShellClient::setTransient()
|
||||
{
|
||||
SurfaceInterface *s = nullptr;
|
||||
if (m_xdgShellSurface) {
|
||||
|
@ -1495,12 +1495,12 @@ void ShellClient::setTransient()
|
|||
m_transient = (s != nullptr);
|
||||
}
|
||||
|
||||
bool ShellClient::hasTransientPlacementHint() const
|
||||
bool XdgShellClient::hasTransientPlacementHint() const
|
||||
{
|
||||
return isTransient() && transientFor() && m_xdgShellPopup;
|
||||
}
|
||||
|
||||
QRect ShellClient::transientPlacement(const QRect &bounds) const
|
||||
QRect XdgShellClient::transientPlacement(const QRect &bounds) const
|
||||
{
|
||||
QRect anchorRect;
|
||||
Qt::Edges anchorEdge;
|
||||
|
@ -1620,7 +1620,7 @@ QRect ShellClient::transientPlacement(const QRect &bounds) const
|
|||
return popupPosition;
|
||||
}
|
||||
|
||||
QPoint ShellClient::popupOffset(const QRect &anchorRect, const Qt::Edges anchorEdge, const Qt::Edges gravity, const QSize popupSize) const
|
||||
QPoint XdgShellClient::popupOffset(const QRect &anchorRect, const Qt::Edges anchorEdge, const Qt::Edges gravity, const QSize popupSize) const
|
||||
{
|
||||
QPoint anchorPoint;
|
||||
switch (anchorEdge & (Qt::LeftEdge | Qt::RightEdge)) {
|
||||
|
@ -1672,19 +1672,19 @@ QPoint ShellClient::popupOffset(const QRect &anchorRect, const Qt::Edges anchorE
|
|||
return anchorPoint + popupPosAdjust;
|
||||
}
|
||||
|
||||
void ShellClient::doResizeSync()
|
||||
void XdgShellClient::doResizeSync()
|
||||
{
|
||||
requestGeometry(moveResizeGeometry());
|
||||
}
|
||||
|
||||
QMatrix4x4 ShellClient::inputTransformation() const
|
||||
QMatrix4x4 XdgShellClient::inputTransformation() const
|
||||
{
|
||||
QMatrix4x4 m = Toplevel::inputTransformation();
|
||||
m.translate(-borderLeft(), -borderTop());
|
||||
return m;
|
||||
}
|
||||
|
||||
void ShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecorationInterface *deco)
|
||||
void XdgShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecorationInterface *deco)
|
||||
{
|
||||
if (m_serverDecoration == deco) {
|
||||
return;
|
||||
|
@ -1697,7 +1697,7 @@ void ShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecora
|
|||
return;
|
||||
}
|
||||
if (!m_unmapped) {
|
||||
// maybe delay to next event cycle in case the ShellClient is getting destroyed, too
|
||||
// maybe delay to next event cycle in case the XdgShellClient is getting destroyed, too
|
||||
updateDecoration(true);
|
||||
}
|
||||
}
|
||||
|
@ -1715,7 +1715,7 @@ void ShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecora
|
|||
);
|
||||
}
|
||||
|
||||
void ShellClient::installXdgDecoration(XdgDecorationInterface *deco)
|
||||
void XdgShellClient::installXdgDecoration(XdgDecorationInterface *deco)
|
||||
{
|
||||
Q_ASSERT(m_xdgShellSurface);
|
||||
|
||||
|
@ -1738,7 +1738,7 @@ void ShellClient::installXdgDecoration(XdgDecorationInterface *deco)
|
|||
});
|
||||
}
|
||||
|
||||
bool ShellClient::shouldExposeToWindowManagement()
|
||||
bool XdgShellClient::shouldExposeToWindowManagement()
|
||||
{
|
||||
if (isLockScreen()) {
|
||||
return false;
|
||||
|
@ -1749,7 +1749,7 @@ bool ShellClient::shouldExposeToWindowManagement()
|
|||
return true;
|
||||
}
|
||||
|
||||
KWayland::Server::XdgShellSurfaceInterface::States ShellClient::xdgSurfaceStates() const
|
||||
KWayland::Server::XdgShellSurfaceInterface::States XdgShellClient::xdgSurfaceStates() const
|
||||
{
|
||||
XdgShellSurfaceInterface::States states;
|
||||
if (isActive()) {
|
||||
|
@ -1767,7 +1767,7 @@ KWayland::Server::XdgShellSurfaceInterface::States ShellClient::xdgSurfaceStates
|
|||
return states;
|
||||
}
|
||||
|
||||
void ShellClient::doMinimize()
|
||||
void XdgShellClient::doMinimize()
|
||||
{
|
||||
if (isMinimized()) {
|
||||
workspace()->clientHidden(this);
|
||||
|
@ -1777,13 +1777,13 @@ void ShellClient::doMinimize()
|
|||
workspace()->updateMinimizedOfTransients(this);
|
||||
}
|
||||
|
||||
void ShellClient::placeIn(const QRect &area)
|
||||
void XdgShellClient::placeIn(const QRect &area)
|
||||
{
|
||||
Placement::self()->place(this, area);
|
||||
setGeometryRestore(geometry());
|
||||
}
|
||||
|
||||
void ShellClient::showOnScreenEdge()
|
||||
void XdgShellClient::showOnScreenEdge()
|
||||
{
|
||||
if (!m_plasmaShellSurface || m_unmapped) {
|
||||
return;
|
||||
|
@ -1795,7 +1795,7 @@ void ShellClient::showOnScreenEdge()
|
|||
}
|
||||
}
|
||||
|
||||
bool ShellClient::dockWantsInput() const
|
||||
bool XdgShellClient::dockWantsInput() const
|
||||
{
|
||||
if (m_plasmaShellSurface) {
|
||||
if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Panel) {
|
||||
|
@ -1805,7 +1805,7 @@ bool ShellClient::dockWantsInput() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void ShellClient::killWindow()
|
||||
void XdgShellClient::killWindow()
|
||||
{
|
||||
if (!surface()) {
|
||||
return;
|
||||
|
@ -1820,19 +1820,19 @@ void ShellClient::killWindow()
|
|||
QTimer::singleShot(5000, c, &ClientConnection::destroy);
|
||||
}
|
||||
|
||||
bool ShellClient::hasPopupGrab() const
|
||||
bool XdgShellClient::hasPopupGrab() const
|
||||
{
|
||||
return m_hasPopupGrab;
|
||||
}
|
||||
|
||||
void ShellClient::popupDone()
|
||||
void XdgShellClient::popupDone()
|
||||
{
|
||||
if (m_xdgShellPopup) {
|
||||
m_xdgShellPopup->popupDone();
|
||||
}
|
||||
}
|
||||
|
||||
void ShellClient::updateClientOutputs()
|
||||
void XdgShellClient::updateClientOutputs()
|
||||
{
|
||||
QVector<OutputInterface*> clientOutputs;
|
||||
const auto outputs = waylandServer()->display()->outputs();
|
||||
|
@ -1845,7 +1845,7 @@ void ShellClient::updateClientOutputs()
|
|||
surface()->setOutputs(clientOutputs);
|
||||
}
|
||||
|
||||
void ShellClient::updateWindowMargins()
|
||||
void XdgShellClient::updateWindowMargins()
|
||||
{
|
||||
QRect windowGeometry;
|
||||
QSize clientSize = m_clientSize;
|
||||
|
@ -1871,7 +1871,7 @@ void ShellClient::updateWindowMargins()
|
|||
}
|
||||
}
|
||||
|
||||
bool ShellClient::isPopupWindow() const
|
||||
bool XdgShellClient::isPopupWindow() const
|
||||
{
|
||||
if (Toplevel::isPopupWindow()) {
|
||||
return true;
|
||||
|
@ -1882,7 +1882,7 @@ bool ShellClient::isPopupWindow() const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ShellClient::supportsWindowRules() const
|
||||
bool XdgShellClient::supportsWindowRules() const
|
||||
{
|
||||
if (m_plasmaShellSurface) {
|
||||
return false;
|
|
@ -48,13 +48,13 @@ enum class PingReason {
|
|||
FocusWindow
|
||||
};
|
||||
|
||||
class KWIN_EXPORT ShellClient : public AbstractClient
|
||||
class KWIN_EXPORT XdgShellClient : public AbstractClient
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ShellClient(KWayland::Server::XdgShellSurfaceInterface *surface);
|
||||
ShellClient(KWayland::Server::XdgShellPopupInterface *surface);
|
||||
~ShellClient() override;
|
||||
XdgShellClient(KWayland::Server::XdgShellSurfaceInterface *surface);
|
||||
XdgShellClient(KWayland::Server::XdgShellPopupInterface *surface);
|
||||
~XdgShellClient() override;
|
||||
|
||||
QStringList activities() const override;
|
||||
QPoint clientContentPos() const override;
|
||||
|
@ -206,7 +206,7 @@ private:
|
|||
void doSetGeometry(const QRect &rect);
|
||||
void unmap();
|
||||
void markAsMapped();
|
||||
static void deleteClient(ShellClient *c);
|
||||
static void deleteClient(XdgShellClient *c);
|
||||
|
||||
QSize toWindowGeometry(const QSize &geometry) const;
|
||||
|
||||
|
@ -255,7 +255,7 @@ private:
|
|||
|
||||
class RequestGeometryBlocker { //TODO rename ConfigureBlocker when this class is Xdg only
|
||||
public:
|
||||
RequestGeometryBlocker(ShellClient *client)
|
||||
RequestGeometryBlocker(XdgShellClient *client)
|
||||
: m_client(client)
|
||||
{
|
||||
m_client->m_requestGeometryBlockCounter++;
|
||||
|
@ -268,7 +268,7 @@ private:
|
|||
}
|
||||
}
|
||||
private:
|
||||
ShellClient *m_client;
|
||||
XdgShellClient *m_client;
|
||||
};
|
||||
friend class RequestGeometryBlocker;
|
||||
int m_requestGeometryBlockCounter = 0;
|
||||
|
@ -286,6 +286,6 @@ private:
|
|||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(KWin::ShellClient*)
|
||||
Q_DECLARE_METATYPE(KWin::XdgShellClient *)
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue