diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2020-07-03 14:31:17 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2020-07-07 12:55:29 +0200 |
commit | 7e412517c4fa10aad6f7bb0b691cb3335e815db0 (patch) | |
tree | 97429362065303715d519b4cd2da3bb8497449db /tests/manual | |
parent | 82f01cc931ef5ed0a77f389666c8071c5c0c4b59 (diff) |
Support wl_surface.damage_buffer
Add compositor support for wl_surface.damage_buffer requests.
This also required updating wl_compositor to version 4.
Fixes: QTBUG-74927
Change-Id: I887ed04e60fe14ecce7df6a517950b0091e2ad54
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/scaling-compositor/main.qml | 47 | ||||
-rw-r--r-- | tests/manual/scaling-compositor/scaling-compositor.pro | 3 |
2 files changed, 35 insertions, 15 deletions
diff --git a/tests/manual/scaling-compositor/main.qml b/tests/manual/scaling-compositor/main.qml index 056af4e5b..655bae1c2 100644 --- a/tests/manual/scaling-compositor/main.qml +++ b/tests/manual/scaling-compositor/main.qml @@ -48,10 +48,9 @@ ** ****************************************************************************/ -import QtQuick 2.2 +import QtQuick 2.15 import QtQuick.Window 2.2 -import QtQuick.Controls 2.0 -import QtWayland.Compositor 1.0 +import QtWayland.Compositor 1.3 WaylandCompositor { id: comp @@ -66,16 +65,7 @@ WaylandCompositor { height: 500 visible: true title: "Scaling compositor x" + output.scaleFactor - Button { - id: incrementButton - text: "+" - onClicked: ++output.scaleFactor - } - Button { - text: "-" - onClicked: output.scaleFactor = Math.max(1, output.scaleFactor - 1) - anchors.left: incrementButton.right - } + Repeater { model: shellSurfaces ShellSurfaceItem { @@ -83,6 +73,33 @@ WaylandCompositor { onSurfaceDestroyed: shellSurfaces.remove(index); } } + + Rectangle { + id: incrementButton + color: "#c0f0d0" + Text { + text: "+" + } + width: 100 + height: 30 + TapHandler { + onTapped: ++output.scaleFactor + } + } + + Rectangle { + id: decrementButton + color: "#f0d0c0" + Text { + text: "-" + } + width: 100 + height: 30 + TapHandler { + onTapped: output.scaleFactor = Math.max(1, output.scaleFactor - 1) + } + anchors.left: incrementButton.right + } } } @@ -91,4 +108,8 @@ WaylandCompositor { WlShell { onWlShellSurfaceCreated: shellSurfaces.append({shellSurface: shellSurface}); } + XdgShell { + onToplevelCreated: + shellSurfaces.append({shellSurface: xdgSurface}); + } } diff --git a/tests/manual/scaling-compositor/scaling-compositor.pro b/tests/manual/scaling-compositor/scaling-compositor.pro index 847e07ea7..200dc8c40 100644 --- a/tests/manual/scaling-compositor/scaling-compositor.pro +++ b/tests/manual/scaling-compositor/scaling-compositor.pro @@ -1,7 +1,6 @@ TEMPLATE = app -QT += gui qml quickcontrols2 - +QT += gui qml SOURCES += main.cpp RESOURCES += qml.qrc |