Overall by modifying this init script your making changes that are only needed 
for Qt 5 eglfs users. Users can use Qt 4 and Qt 5 Wayland which this patch may 
cause problems for.

Honestly your probably better off duplicating this init script and making a Qt 
5 eglfs variant since there seems to be a significant amount of tweaks. Then 
select which init you want based on if Qt 5 is being used and if Wayland is 
being used.


Additional comments below.
> -----Original Message-----
> From: [email protected] [mailto:meta-arago-
> [email protected]] On Behalf Of Stiffler, Jacob
> Sent: Tuesday, March 17, 2015 9:39 AM
> To: [email protected]
> Subject: [meta-arago] [PATCH] matrix-gui: Clear background when starting
> and stopping matrix.
> 
> * Clearing the background is done by calling refresh_screen with the
>   "background-black" argument.
> * Always switch virtual terminals so that command prompt will be visible
>   upon exiting matrix.
> * Disable blinking cursor while matrix is running, re-enable when stopping
>   matrix.
>     - When using qt over eglfs, the blinking cursor will show through the
>       gui.
> 
> Signed-off-by: Jacob Stiffler <[email protected]>
> ---
>  .../recipes-core/matrix/matrix-gui/init            |   10 +++++++++-
>  .../recipes-core/matrix/matrix-gui_2.0.bb          |    4 +---
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/init b/meta-
> arago-extras/recipes-core/matrix/matrix-gui/init
> index 3ec0a55..9f0507f 100644
> --- a/meta-arago-extras/recipes-core/matrix/matrix-gui/init
> +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/init
> @@ -16,7 +16,7 @@ test -x "$matrixgui" || exit 0
> 
>  case "$1" in
>    start)
> -    __SWITCH_FOREGROUND_VT__
> +    chvt 4
[Franklin] I don't understand why you're getting rid of 
__SWITCH_FOREGROUND_VT__ when its sole purpose is to give you the flexibility. 
Your hard coding rather than using the variable which can end up causing 
problems for Wayland. Just use the variable.
> 
>      #Clear out the the tmp and lock directory
>      cd __MATRIX_WEB_DIR__
> @@ -34,6 +34,9 @@ case "$1" in
>        fi
>      fi
> 
> +    echo 0 > /sys/class/graphics/fbcon/cursor_blink
> +    refresh_screen "background-black"
[Franklin] This isn't needed. Matrix GUI gets displayed full screen so there is 
no need for refresh screen.
> +
>      echo -n "Starting Matrix GUI application"
>      start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE 
> --exec
> $matrixgui -- $GUI_OPTS
>      echo "."
> @@ -42,6 +45,11 @@ case "$1" in
>    stop)
>      echo -n "Stopping Matrix GUI application"
>      start-stop-daemon --stop --quiet --pidfile $PIDFILE
> +
> +    refresh_screen "background-black"
> +    echo 1 > /sys/class/graphics/fbcon/cursor_blink
> +    chvt 1
> +
>      echo "."
>      ;;
>    *)
> diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> index 1b61ff1..b4161ff 100644
> --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM =
> "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> 
>  SECTION = "multimedia"
> 
> -PR = "r21"
> +PR = "r22"
> 
>  INITSCRIPT_NAME = "matrix-gui-2.0"
>  INITSCRIPT_PARAMS = "defaults 97"
> @@ -27,7 +27,6 @@ require matrix-gui-paths.inc  S = "${WORKDIR}/git"
> 
>  MATRIX_FLAGS = "${@base_conditional('QT_PROVIDER','qt5','','-qws',d)}"
> -SWITCH_FOREGROUND_VT =
> "${@base_conditional('QT_PROVIDER','qt5','','chvt 4',d)}"
>  do_install(){
>       install -d ${D}${MATRIX_BASE_DIR}
>       install -d ${D}${MATRIX_WEB_DIR}
> @@ -39,7 +38,6 @@ do_install(){
>       # Set the proper path in the init script
>       sed -i -e s=__MATRIX_WEB_DIR__=${MATRIX_WEB_DIR}=
> ${WORKDIR}/init
>       sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> ${WORKDIR}/init
> -     sed -i -e
> "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/"
> ${WORKDIR}/init
> 
>       # Install the init script
>       # TODO: replace init script with systemd files
> --
> 1.7.9.5
> 
> _______________________________________________
> meta-arago mailing list
> [email protected]
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to