summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwayland/0002-Fix-multiple-QWindow.patch
blob: 1777105168efb394efa9a341320636c9f595e482 (plain)
1
## Building the test widgets
1. Source the SDK environment script
2. Create a build directory
3. Configure and build the project

```
mkdir build
cd build
cmake .. -DBUILD_TEST_WGT=TRUE
make 
make widget
```
Note: If you omit the -DBUILD_TEST_WGT=TRUE parameter for cmake, you'll have to type `make test_widget` to compile the test widget.

This should produce two _.wgt_ files - one with the service and one with the tests within the build directory.

Run the tests:
```
scp *.wgt root@<board-ip>:~
ssh root@<board-ip>
afm-test $(ls *test.wgt)

```

The tests for agl-service-mediaplayer require at least a few tracks into your mediaplayer playlist with at least 10 seconds of playtime for seeking test.
699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
From 23534d35587a8b62c945fef1adb29109e5c01bfa Mon Sep 17 00:00:00 2001
From: Nobuhiko Tanibata <ntanibata@jp.adit-jv.com>
Date: Fri, 6 Nov 2015 09:59:48 +0900
Subject: [PATCH 2/2] Fix multiple QWindow

Signed-off-by: Nobuhiko Tanibata <ntanibata@jp.adit-jv.com>
---
 .../ivi-shell/qwaylandivishellintegration.cpp            | 16 ++++++++++------
 .../ivi-shell/qwaylandivishellintegration.h              |  1 +
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp
index 763fafb..c42f283 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp
@@ -58,6 +58,7 @@ namespace QtWaylandClient {

 QWaylandIviShellIntegration::QWaylandIviShellIntegration()
     : m_iviApplication(Q_NULLPTR)
+    , m_surfaceId(0)
 {
 }

@@ -79,15 +80,18 @@ QWaylandShellSurface *QWaylandIviShellIntegration::createShellSurface(QWaylandWi
     if (!m_iviApplication)
         return Q_NULLPTR;

-    uint32_t id = 0;
-    QVariant value = window->property("IVI-Surface-ID");
-    if (value.isValid()) {
-        id = value.toUInt();
+    if (m_surfaceId == 0) {
+        QVariant value = window->property("IVI-Surface-ID");
+        if (value.isValid()) {
+            m_surfaceId = value.toUInt();
+        } else {
+            m_surfaceId = IVI_SURFACE_ID + getpid();
+        }
     } else {
-        id = IVI_SURFACE_ID + getpid();
+        m_surfaceId++;
     }

-    struct ivi_surface *surface = m_iviApplication->surface_create(id, window->object());
+    struct ivi_surface *surface = m_iviApplication->surface_create(m_surfaceId, window->object());

     return new QWaylandIviSurface(surface, window);
 }
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
index 4856ec6..1d10e91 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
@@ -70,6 +70,7 @@ private:

 private:
     QtWayland::ivi_application *m_iviApplication;
+    uint32_t m_surfaceId;
 };

 }
--
1.8.3.1