[tests] Add fullscreen mode to waylandclienttest
Pressing key f toggles the window between fullscreen and normal mode.
This commit is contained in:
parent
eda4f61037
commit
748754bce1
1 changed files with 11 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue