summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugen Friedrich <efriedrich@de.adit-jv.com>2023-01-20 11:21:24 +0100
committerEugen Friedrich <efriedrich@de.adit-jv.com>2023-01-20 11:21:24 +0100
commit90a904b0ad57b5a4149a366307b54249bc109854 (patch)
tree8376783a71f5618876bdc6686add3a1ddde25585
parent40596515569210b603caff702568681659c05fec (diff)
parent4c7d574af5cfba7a06c6d5575ee699ee8381fab8 (diff)
downloadwayland-ivi-extension-90a904b0ad57b5a4149a366307b54249bc109854.tar.gz
Merge remote-tracking branch 'upstream/pull/141'
* upstream/pull/141 CMakeLists: update libweston to version 8 Remove unused function decodeEscapesequences Remove unused function importSceneFromTXTHelper Add missing include of endian.h Fix crash in controller_screenshot_notify Reviewed-by: Eugen Friedrich <efriedrich@de.adit-jv.com> Reviewed-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com> Tested-by: Doan Ngoc Au <au.doanngoc@vn.bosch.com>
-rw-r--r--ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt2
-rw-r--r--ivi-layermanagement-api/ilmControl/src/bitmap.c1
-rw-r--r--ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp61
-rw-r--r--ivi-layermanagement-examples/simple-weston-client/CMakeLists.txt4
-rw-r--r--weston-ivi-shell/src/ivi-controller.c5
5 files changed, 8 insertions, 65 deletions
diff --git a/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt
index d5834f3..3a1d9c6 100644
--- a/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt
+++ b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt
@@ -25,7 +25,7 @@ find_package(PkgConfig REQUIRED)
pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED)
pkg_check_modules(WESTON weston>=6.0.0 REQUIRED)
pkg_check_modules(PIXMAN pixman-1 REQUIRED)
-pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-7 REQUIRED)
+pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-8 REQUIRED)
find_package(Threads REQUIRED)
diff --git a/ivi-layermanagement-api/ilmControl/src/bitmap.c b/ivi-layermanagement-api/ilmControl/src/bitmap.c
index 79d2a5d..2bbe758 100644
--- a/ivi-layermanagement-api/ilmControl/src/bitmap.c
+++ b/ivi-layermanagement-api/ilmControl/src/bitmap.c
@@ -26,6 +26,7 @@
#include <stdbool.h>
#include <arpa/inet.h>
#include "ivi-wm-client-protocol.h"
+#include <endian.h>
struct __attribute__ ((__packed__)) BITMAPFILEHEADER {
char bfType[2];
diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp
index 6b11c3d..54ecbf1 100644
--- a/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp
+++ b/ivi-layermanagement-examples/LayerManagerControl/src/sceneio.cpp
@@ -175,67 +175,6 @@ void exportSceneToTXTHelper(ostream& stream, StringMapTree* tree, string prefix
stream << prefix + "}";
}
-string decodeEscapesequences(string s)
-{
- map<string, string> code;
- code["\\[\\]"] = "\\";
- code["\\[n]"] = "\n";
- code["\\[t]"] = "\t";
- code["\\[v]"] = "\v";
- code["\\[b]"] = "\b";
- code["\\[f]"] = "\f";
- code["\\[r]"] = "\r";
- return replaceAll(s, code);
-}
-
-void importSceneFromTXTHelper(istream& stream, StringMapTree* node)
-{
- string in;
- //Type
- getline(stream, in);
- int typeSize = in.find(":") - in.find_first_not_of('\t');
- int typeStart = in.find_first_not_of('\t');
- node->mNodeLabel = in.substr(typeStart, typeSize);
- while (true)
- {
- long streamPosition = stream.tellg();
- getline(stream, in);
- in = rtrim(in);
-
- //end of object
- if (in.substr(0, 1) == "}")
- return;
-
- //start of object property
- if (in.substr(0, 1) == "[")
- {
- int startIndex = in.find('[') + 1;
- int endIndex = in.find(":");
- string propertyName = in.substr(startIndex, endIndex - startIndex);
- propertyName = decodeEscapesequences(propertyName);
-
- startIndex = endIndex + 1;
- endIndex = in.find("]");
- string propertyType = in.substr(startIndex, endIndex - startIndex);
- propertyType = decodeEscapesequences(propertyType);
-
- startIndex = in.find('[', endIndex) + 1;
- endIndex = in.find_last_of(']');
- string propertyValue = in.substr(startIndex, endIndex - startIndex);
- propertyValue = decodeEscapesequences(propertyValue);
-
- node->mNodeValues[propertyName] = make_pair(propertyType, propertyValue);
- }
- else
- {
- stream.seekg(streamPosition);
- StringMapTree* child = new StringMapTree;
- node->mChildren.push_back(child);
- importSceneFromTXTHelper(stream, child);
- }
- }
-}
-
string makeValidXMLCharacters(string s)
{
map<string, string> code;
diff --git a/ivi-layermanagement-examples/simple-weston-client/CMakeLists.txt b/ivi-layermanagement-examples/simple-weston-client/CMakeLists.txt
index 847c9a1..d3bb616 100644
--- a/ivi-layermanagement-examples/simple-weston-client/CMakeLists.txt
+++ b/ivi-layermanagement-examples/simple-weston-client/CMakeLists.txt
@@ -22,14 +22,14 @@ project (simple-weston-client)
find_package(PkgConfig)
pkg_check_modules(WAYLAND_CLIENT wayland-client REQUIRED)
pkg_check_modules(WAYLAND_CURSOR wayland-cursor REQUIRED)
-pkg_check_modules(LIBWESTON_PROTOCOLS libweston-7-protocols QUIET)
+pkg_check_modules(LIBWESTON_PROTOCOLS libweston-8-protocols QUIET)
if(${LIBWESTON_PROTOCOLS_FOUND})
#check for DLT
pkg_check_modules(DLT automotive-dlt QUIET)
#import the pkgdatadir from libweston-protocols pkgconfig file
- execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir libweston-7-protocols
+ execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir libweston-8-protocols
OUTPUT_VARIABLE WestonProtocols_PKGDATADIR)
string(REGEX REPLACE "[\r\n]" "" WestonProtocols_PKGDATADIR "${WestonProtocols_PKGDATADIR}")
SET(LIBWESTON_PROTOCOLS_PKGDATADIR ${WestonProtocols_PKGDATADIR})
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c
index cabd31b..629e673 100644
--- a/weston-ivi-shell/src/ivi-controller.c
+++ b/weston-ivi-shell/src/ivi-controller.c
@@ -86,6 +86,7 @@ struct screenshot_frame_listener {
struct wl_listener frame_listener;
struct wl_listener output_destroyed;
struct wl_resource *screenshot;
+ struct weston_output *output;
};
struct screen_id_info {
@@ -1206,7 +1207,7 @@ controller_screenshot_notify(struct wl_listener *listener, void *data)
struct screenshot_frame_listener *l =
wl_container_of(listener, l, frame_listener);
- struct weston_output *output = data;
+ struct weston_output *output = l->output;
int32_t width = 0;
int32_t height = 0;
int32_t stride = 0;
@@ -1336,6 +1337,8 @@ controller_screen_screenshot(struct wl_client *client,
return;
}
+ l->output = iviscrn->output;
+
wl_resource_set_implementation(l->screenshot, NULL, l,
screenshot_frame_listener_destroy);
l->output_destroyed.notify = screenshot_output_destroyed;