aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-flutter/recipes-graphics/toyota/files/0002-shell-configuration-Obey-json-configuration-file.patch
blob: b9a864c5cac29db9df4e0feeec62dc31c6d51297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 36c7deb35719d2219dc6e868ab14d9a4ce984d1f Mon Sep 17 00:00:00 2001
From: Marius Vlad <marius.vlad@collabora.com>
Date: Mon, 25 Jul 2022 15:51:06 +0300
Subject: [PATCH 2/3] shell/configuration: Obey json configuration file

Setting the name of the application to kApplicationName, by default,
would cause the check in getCliOverrides to always be true, which in
turn will ignore whatever the user specified in the configuration file.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
---
 shell/configuration/configuration.cc | 2 ++
 shell/main.cc                        | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/shell/configuration/configuration.cc b/shell/configuration/configuration.cc
index f8b1e13..616de48 100644
--- a/shell/configuration/configuration.cc
+++ b/shell/configuration/configuration.cc
@@ -220,6 +220,8 @@ std::vector<struct Configuration::Config> Configuration::ParseConfig(
     if (cfg.view.height == 0) {
       cfg.view.height = kDefaultViewHeight;
     }
+    if (cfg.app_id.empty())
+      cfg.app_id = kApplicationName;
 
     res.emplace_back(cfg);
   }
diff --git a/shell/main.cc b/shell/main.cc
index 65c3f37..6fdd907 100644
--- a/shell/main.cc
+++ b/shell/main.cc
@@ -44,7 +44,7 @@ void RemoveArgument(std::vector<std::string>& args, const std::string& arg) {
 
 int main(int argc, char** argv) {
   struct Configuration::Config config {
-    .app_id = kApplicationName, .json_configuration_path{}, .cursor_theme{},
+    .app_id = {}, .json_configuration_path{}, .cursor_theme{},
     .disable_cursor{}, .debug_backend{}, .view {}
   };
 
-- 
2.35.3