Message ID | 20230524181122.35202-8-rs@ti.com |
---|---|
State | Accepted |
Delegated to: | Ryan Eatmon |
Headers | show |
Series | Rootless Weston and Weston patch cleanup | expand |
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend index a73b669d..4d5db58c 100644 --- a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +++ b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend @@ -2,6 +2,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PR:append = ".arago12" -#SRC_URI:append = " \ -# file://weston.ini \ -#" +SRC_URI:append = " \ + file://weston.ini \ + file://weston-launch-calibrator.sh \ +" + +do_install:append() { + install -Dm755 weston-launch-calibrator.sh ${D}/${bindir}/weston-launch-calibrator +} + +FILES:${PN}:append = "${bindir}/weston-launch-calibrator" diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh new file mode 100644 index 00000000..45863ecd --- /dev/null +++ b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -e /dev/input/touchscreen0 ]; then + echo "Touch screen detected..." + if [ -n "$LIBINPUT_CALIBRATION_MATRIX" ]; then + echo "Calibration matrix already present, skipping calibration..." + else + echo "Calibrating touchscreen..." + exec weston-calibrator + fi +else + echo "Touch screen not detected, skipping calibration..." +fi diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini index 4cc2683a..b9610fa8 100644 --- a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini +++ b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini @@ -11,6 +11,10 @@ startup-animation=fade [libinput] touchscreen_calibrator=true +[autolaunch] +# launch the calibrator on startup if a touchscreen is detected +path=/usr/bin/weston-launch-calibrator + [screensaver] # Uncomment path to disable screensaver #path=@libexecdir@/weston-screensaver