[tests] Add fullscreen mode to waylandclienttest
Pressing key f toggles the window between fullscreen and normal mode.icc-effect-5.14.5
parent
eda4f61037
commit
748754bce1
|
@ -145,6 +145,17 @@ void WaylandClientTest::setupRegistry(Registry *registry)
|
||||||
if (key == KEY_Q && state == Keyboard::KeyState::Released) {
|
if (key == KEY_Q && state == Keyboard::KeyState::Released) {
|
||||||
QCoreApplication::instance()->quit();
|
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 New Issue