[tests] Add fullscreen mode to waylandclienttest

Pressing key f toggles the window between fullscreen and normal mode.
icc-effect-5.14.5
Martin Gräßlin 2015-09-30 15:37:00 +02:00
parent eda4f61037
commit 748754bce1
1 changed files with 11 additions and 0 deletions

View File

@ -145,6 +145,17 @@ void WaylandClientTest::setupRegistry(Registry *registry)
if (key == KEY_Q && state == Keyboard::KeyState::Released) {
QCoreApplication::instance()->quit();
}
if (key == KEY_F && state == Keyboard::KeyState::Released) {
if (m_shellSurface) {
static bool s_fullscreen = false;
s_fullscreen = !s_fullscreen;
if (s_fullscreen) {
m_shellSurface->setFullscreen();
} else {
m_shellSurface->setToplevel();
}
}
}
}
);
}