From 748754bce10ee543f97331532b781a68a8357ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 30 Sep 2015 15:37:00 +0200 Subject: [PATCH] [tests] Add fullscreen mode to waylandclienttest Pressing key f toggles the window between fullscreen and normal mode. --- tests/waylandclienttest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/waylandclienttest.cpp b/tests/waylandclienttest.cpp index 7d5f0fb53f..3c4d01d93b 100644 --- a/tests/waylandclienttest.cpp +++ b/tests/waylandclienttest.cpp @@ -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(); + } + } + } } ); }