From 67f5c8b103a2de7e015b735e3077195aa8b7dd62 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 8 Jan 2014 19:15:21 +0100 Subject: [PATCH] matchbox-keyboard: fix virtual keyboard on graphical images Virtual keyboard was not showing up when clicking on the keyboard icon in the menu bar. The reason was the keyboard xsession script was not being run on X startup due to the extension '.shbg' of the original script. https://jira.digi.com/browse/DEL-911 Signed-off-by: Javier Viguera --- .../files/80matchboxkeyboard.sh | 27 +++++++++++++++++++ .../matchbox-keyboard_git.bbappend | 13 +++++++++ 2 files changed, 40 insertions(+) create mode 100644 meta-digi-dey/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh create mode 100644 meta-digi-dey/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bbappend diff --git a/meta-digi-dey/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh b/meta-digi-dey/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh new file mode 100644 index 000000000..3733a5f79 --- /dev/null +++ b/meta-digi-dey/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +. /etc/formfactor/config + +CMD="" + +# Group the commands in a function so they can be run in background +run_keyboard() { + # Delay to make sure the window manager is active + # by waiting for the desktop to say its finished loading + dbus-wait org.matchbox_project.desktop Loaded + exec $CMD +} + +if [ "$HAVE_KEYBOARD" = "0" ]; then + CMD="matchbox-keyboard -d" +elif [ "$DISPLAY_CAN_ROTATE" = "1" ]; then + if [ "$HAVE_KEYBOARD_PORTRAIT" = "1" -a "$HAVE_KEYBOARD_LANDSCAPE" = "0" ]; then + CMD="matchbox-keyboard -d -o landscape" + elif [ "$HAVE_KEYBOARD_LANDSCAPE" = "1" -a "$HAVE_KEYBOARD_PORTRAIT" = "0" ]; then + CMD="matchbox-keyboard -d -o portrait" + fi +fi + +if [ "$CMD" ]; then + run_keyboard & +fi diff --git a/meta-digi-dey/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bbappend b/meta-digi-dey/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bbappend new file mode 100644 index 000000000..65045a7ba --- /dev/null +++ b/meta-digi-dey/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bbappend @@ -0,0 +1,13 @@ +# Copyright (C) 2014 Digi International. + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " \ + file://80matchboxkeyboard.sh \ +" + +do_install_append () { + # Remove upstream '80matchboxkeyboard.shbg' file and install ours + rm -f ${D}/${sysconfdir}/X11/Xsession.d/80matchboxkeyboard.shbg + install -m 0755 ${WORKDIR}/80matchboxkeyboard.sh ${D}/${sysconfdir}/X11/Xsession.d/ +}