[client] Add methods to get ShellSurface from a QWindow
Summary: This is similar to what already exists for Surface. With this methods it's possible to get a ShellSurface from an existing QWindow and to perform low level native calls directly for the ShellSurface. Similar calls will also be needed for XdgShellSurface, though the xdg_shell_surface is not yet available through the native interface. Test Plan: Used in breeze to trigger window moving Reviewers: #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D3018
This commit is contained in:
parent
97afd2658d
commit
336ff134da
1 changed files with 4 additions and 0 deletions
|
@ -246,6 +246,8 @@ void TestWaylandShell::testCreateMultiple()
|
|||
QScopedPointer<ShellSurface> surface1(m_shell->createSurface(s1.data()));
|
||||
QVERIFY(!surface1.isNull());
|
||||
QVERIFY(surface1->isValid());
|
||||
QVERIFY(!ShellSurface::get(nullptr));
|
||||
QCOMPARE(ShellSurface::get(*(surface1.data())), surface1.data());
|
||||
|
||||
QVERIFY(serverSurfaceSpy.wait());
|
||||
QCOMPARE(serverSurfaceSpy.count(), 1);
|
||||
|
@ -253,6 +255,7 @@ void TestWaylandShell::testCreateMultiple()
|
|||
QScopedPointer<ShellSurface> surface2(m_shell->createSurface(s2.data()));
|
||||
QVERIFY(!surface2.isNull());
|
||||
QVERIFY(surface2->isValid());
|
||||
QCOMPARE(ShellSurface::get(*(surface2.data())), surface2.data());
|
||||
|
||||
QVERIFY(serverSurfaceSpy.wait());
|
||||
QCOMPARE(serverSurfaceSpy.count(), 2);
|
||||
|
@ -261,6 +264,7 @@ void TestWaylandShell::testCreateMultiple()
|
|||
QScopedPointer<ShellSurface> surface3(m_shell->createSurface(s2.data()));
|
||||
QVERIFY(!surface3.isNull());
|
||||
QVERIFY(surface3->isValid());
|
||||
QCOMPARE(ShellSurface::get(*(surface3.data())), surface3.data());
|
||||
|
||||
QVERIFY(!serverSurfaceSpy.wait(100));
|
||||
QCOMPARE(serverSurfaceSpy.count(), 2);
|
||||
|
|
Loading…
Reference in a new issue