summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2016-04-07 23:13:31 +0200
committerPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2016-04-25 10:51:40 +0000
commit38cdbabc0fe92a105ac6f6accaa6e75a6d730e56 (patch)
treeda30547aa82ab9f32a1be4e1128b66a69e5f475e
parent1aa4f823d2ffb532b1c7b7c7070693bd585de017 (diff)
Add window manager extension to the pure-qml example
Change-Id: I50a5ab6156fabac93bcc706bb49fb7dc92cf342d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
-rw-r--r--examples/wayland/pure-qml/qml/Screen.qml6
-rw-r--r--examples/wayland/pure-qml/qml/main.qml8
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/wayland/pure-qml/qml/Screen.qml b/examples/wayland/pure-qml/qml/Screen.qml
index 0d6c93adc..2043fa8b4 100644
--- a/examples/wayland/pure-qml/qml/Screen.qml
+++ b/examples/wayland/pure-qml/qml/Screen.qml
@@ -79,6 +79,12 @@ WaylandOutput {
inputDevice: output.compositor.defaultInputDevice
}
}
+
+ Shortcut {
+ sequence: "Meta+F"
+ onActivated: qtWindowManager.showIsFullScreen = !qtWindowManager.showIsFullScreen
+ }
+
Shortcut {
sequence: "Ctrl+Alt+Backspace"
onActivated: Qt.quit()
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml
index bc9f29f39..ac8dde712 100644
--- a/examples/wayland/pure-qml/qml/main.qml
+++ b/examples/wayland/pure-qml/qml/main.qml
@@ -63,6 +63,14 @@ WaylandCompositor {
}
extensions: [
+ WindowManager {
+ id: qtWindowManager
+ onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen)
+
+ Component.onCompleted: {
+ initialize();
+ }
+ },
WlShell {
id: defaultShell