f06d4548c4169bddfe9855d87da92c0a58c26f92
[AGL/meta-agl-devel.git] /
1 From a3a1421c3986bbafd9f91997eec7f2606ef67fc3 Mon Sep 17 00:00:00 2001
2 From: Marius Vlad <marius.vlad@collabora.com>
3 Date: Mon, 25 Jul 2022 15:53:17 +0300
4 Subject: [PATCH 3/3] shell/configuration: Fixes to general options
5
6 This patch avoids an automatic overwrite of the debug_backend and
7 disable_cursor entries. If enabled in the configuration file, the test
8 will always return true, basically overwriting to false.
9
10 Also, use the correct entry in the README file for debug_backend.
11
12 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
13 ---
14  README.md                            | 2 +-
15  shell/configuration/configuration.cc | 6 ++++--
16  2 files changed, 5 insertions(+), 3 deletions(-)
17
18 diff --git a/README.md b/README.md
19 index 7c162eb..d459f4c 100644
20 --- a/README.md
21 +++ b/README.md
22 @@ -175,7 +175,7 @@ Loads Single View
23  
24  {
25     "disable_cursor":true,
26 -   "backend_debug":true,
27 +   "debug_backend":true,
28     "accessibility_features":31,
29     "view":{
30        "bundle_path":"/home/joel/development/gallery/.homescreen/x86/release",
31 diff --git a/shell/configuration/configuration.cc b/shell/configuration/configuration.cc
32 index 616de48..773724c 100644
33 --- a/shell/configuration/configuration.cc
34 +++ b/shell/configuration/configuration.cc
35 @@ -152,10 +152,12 @@ void Configuration::getCliOverrides(Config& instance, Config& cli) {
36    if (!cli.cursor_theme.empty()) {
37      instance.cursor_theme = cli.cursor_theme;
38    }
39 -  if (cli.disable_cursor != instance.disable_cursor) {
40 +  if (cli.disable_cursor == true &&
41 +      cli.disable_cursor != instance.disable_cursor) {
42      instance.disable_cursor = cli.disable_cursor;
43    }
44 -  if (cli.debug_backend != instance.debug_backend) {
45 +  if (cli.debug_backend == true &&
46 +      cli.debug_backend != instance.debug_backend) {
47      instance.debug_backend = cli.debug_backend;
48    }
49    if (!cli.view.vm_args.empty()) {
50 -- 
51 2.35.3
52