Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/dont_crash_cursor_physical_size_empty.cpp
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | 98 | { | |||
---|---|---|---|---|---|
110 | 110 | | |||
111 | // destroy physical size | 111 | // destroy physical size | ||
112 | KWayland::Server::Display *display = waylandServer()->display(); | 112 | KWayland::Server::Display *display = waylandServer()->display(); | ||
113 | auto output = display->outputs().first(); | 113 | auto output = display->outputs().first(); | ||
114 | output->setPhysicalSize(QSize(0, 0)); | 114 | output->setPhysicalSize(QSize(0, 0)); | ||
115 | // and fake a cursor theme change, so that the theme gets recreated | 115 | // and fake a cursor theme change, so that the theme gets recreated | ||
116 | emit KWin::Cursor::self()->themeChanged(); | 116 | emit KWin::Cursor::self()->themeChanged(); | ||
117 | 117 | | |||
118 | KWin::Cursor::setPos(QPoint(c->geometry().center().x(), c->clientPos().y() / 2)); | 118 | KWin::Cursor::setPos(QPoint(c->frameGeometry().center().x(), c->clientPos().y() / 2)); | ||
119 | } | 119 | } | ||
120 | 120 | | |||
121 | WAYLANDTEST_MAIN(DontCrashCursorPhysicalSizeEmpty) | 121 | WAYLANDTEST_MAIN(DontCrashCursorPhysicalSizeEmpty) | ||
122 | #include "dont_crash_cursor_physical_size_empty.moc" | 122 | #include "dont_crash_cursor_physical_size_empty.moc" |