Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/dont_crash_useractions_menu.cpp
Show All 25 Lines | |||||
26 | #include "screens.h" | 26 | #include "screens.h" | ||
27 | #include "useractions.h" | 27 | #include "useractions.h" | ||
28 | #include "wayland_server.h" | 28 | #include "wayland_server.h" | ||
29 | #include "workspace.h" | 29 | #include "workspace.h" | ||
30 | 30 | | |||
31 | #include <KWayland/Client/compositor.h> | 31 | #include <KWayland/Client/compositor.h> | ||
32 | #include <KWayland/Client/keyboard.h> | 32 | #include <KWayland/Client/keyboard.h> | ||
33 | #include <KWayland/Client/pointer.h> | 33 | #include <KWayland/Client/pointer.h> | ||
34 | #include <KWayland/Client/shell.h> | | |||
35 | #include <KWayland/Client/seat.h> | 34 | #include <KWayland/Client/seat.h> | ||
36 | #include <KWayland/Client/shm_pool.h> | 35 | #include <KWayland/Client/shm_pool.h> | ||
37 | #include <KWayland/Client/surface.h> | 36 | #include <KWayland/Client/surface.h> | ||
38 | #include <KWayland/Client/touch.h> | 37 | #include <KWayland/Client/touch.h> | ||
39 | 38 | | |||
40 | #include <linux/input.h> | 39 | #include <linux/input.h> | ||
41 | 40 | | |||
42 | using namespace KWin; | 41 | using namespace KWin; | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
88 | { | 87 | { | ||
89 | Test::destroyWaylandConnection(); | 88 | Test::destroyWaylandConnection(); | ||
90 | } | 89 | } | ||
91 | 90 | | |||
92 | void TestDontCrashUseractionsMenu::testShowHideShowUseractionsMenu() | 91 | void TestDontCrashUseractionsMenu::testShowHideShowUseractionsMenu() | ||
93 | { | 92 | { | ||
94 | // this test creates the condition of BUG 382063 | 93 | // this test creates the condition of BUG 382063 | ||
95 | QScopedPointer<Surface> surface1(Test::createSurface()); | 94 | QScopedPointer<Surface> surface1(Test::createSurface()); | ||
96 | QScopedPointer<QObject> shellSurface1(Test::createShellSurface(Test::ShellSurfaceType::WlShell, surface1.data())); | 95 | QScopedPointer<XdgShellSurface> shellSurface1(Test::createXdgShellStableSurface(surface1.data())); | ||
97 | auto client = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); | 96 | auto client = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); | ||
98 | QVERIFY(client); | 97 | QVERIFY(client); | ||
99 | 98 | | |||
100 | workspace()->showWindowMenu(QRect(), client); | 99 | workspace()->showWindowMenu(QRect(), client); | ||
101 | auto userActionsMenu = workspace()->userActionsMenu(); | 100 | auto userActionsMenu = workspace()->userActionsMenu(); | ||
102 | QTRY_VERIFY(userActionsMenu->isShown()); | 101 | QTRY_VERIFY(userActionsMenu->isShown()); | ||
103 | QVERIFY(userActionsMenu->hasClient()); | 102 | QVERIFY(userActionsMenu->hasClient()); | ||
104 | 103 | | |||
Show All 13 Lines |