From 53a00aaf417c666914c0dfee9d2feab2c2f05390 Mon Sep 17 00:00:00 2001 From: Lorenzo Tilve Date: Fri, 14 Feb 2020 12:12:08 +0100 Subject: Use landscape layout by default on HTML5 image This also workarounds an issue when starting the homescreen in portrait mode by default. Bug-AGL: SPEC-3181 Change-Id: Ia84baab19c13c8484f681c8218a406e836dd08b0 Signed-off-by: Lorenzo Tilve (cherry picked from commit 59bd63d58261d55bba95e1e243b670c4670f91b1) --- .../agl-service-windowmanager_git.bbappend | 9 +++ .../files/areas.horizontal.json | 94 ++++++++++++++++++++++ .../wayland/weston-ini-conf.bbappend | 12 +++ .../wayland/weston-ini-conf/hdmi-a-1-180.cfg | 4 + .../wayland/weston-ini-conf/virtual-landscape.cfg | 3 + 5 files changed, 122 insertions(+) create mode 100644 meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bbappend create mode 100644 meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/files/areas.horizontal.json create mode 100644 meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg create mode 100644 meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/virtual-landscape.cfg diff --git a/meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bbappend b/meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bbappend new file mode 100644 index 00000000..06f89f69 --- /dev/null +++ b/meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " \ + file://areas.horizontal.json \ +" + +do_compile_prepend() { + cp ${WORKDIR}/areas.horizontal.json ${S}/conf/areas.json +} diff --git a/meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/files/areas.horizontal.json b/meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/files/areas.horizontal.json new file mode 100644 index 00000000..4b6f0c39 --- /dev/null +++ b/meta-agl-profile-graphical-html5/recipes-apis/agl-service-windowmanager/files/areas.horizontal.json @@ -0,0 +1,94 @@ +{ + "areas": [ + { + "name": "fullscreen", + "rect": { + "x": 0, + "y": 0, + "w": 1920, + "h": 1080 + } + }, + { + "name": "normal.full", + "rect": { + "x": 218, + "y": 0, + "w": 1702, + "h": 1080 + } + }, + { + "name": "split.main", + "rect": { + "x": 218, + "y": 0, + "w": 744, + "h": 1080 + } + }, + { + "name": "split.sub", + "rect": { + "x": 962, + "y": 0, + "w": 744, + "h": 1080 + } + }, + { + "name": "software_keyboard", + "rect": { + "x": 962, + "y": 0, + "w": 744, + "h": 1080 + } + }, + { + "name": "restriction.normal", + "rect": { + "x": 218, + "y": 0, + "w": 1488, + "h": 1080 + } + }, + { + "name": "restriction.split.main", + "rect": { + "x": 218, + "y": 0, + "w": 744, + "h": 1080 + } + }, + { + "name": "restriction.split.sub", + "rect": { + "x": 962, + "y": 0, + "w": 744, + "h": 1080 + } + }, + { + "name": "on_screen", + "rect": { + "x": 218, + "y": 0, + "w": 1488, + "h": 1080 + } + }, + { + "name": "remote.fullscreen", + "rect": { + "x": 0, + "y": 0, + "w": 720, + "h": 640 + } + } + ] +} diff --git a/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..2c5201aa --- /dev/null +++ b/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_remove = " \ + file://hdmi-a-1-270.cfg \ + file://hdmi-a-1-90.cfg \ + file://virtual.cfg \ +" + +SRC_URI += " \ + file://hdmi-a-1-180.cfg \ + file://virtual-landscape.cfg \ +" diff --git a/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg b/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg new file mode 100644 index 00000000..59e2c2db --- /dev/null +++ b/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-180.cfg @@ -0,0 +1,4 @@ +# A display is connected to HDMI-A-1 +[output] +name=HDMI-A-1 +transform=0 diff --git a/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/virtual-landscape.cfg b/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/virtual-landscape.cfg new file mode 100644 index 00000000..d6925363 --- /dev/null +++ b/meta-agl-profile-graphical-html5/recipes-graphics/wayland/weston-ini-conf/virtual-landscape.cfg @@ -0,0 +1,3 @@ +[output] +name=Virtual-1 +mode=1920x1080 -- cgit 1.2.3-korg