diff options
Diffstat (limited to 'yocto-poky/meta/recipes-sato/matchbox-keyboard')
3 files changed, 100 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh b/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh new file mode 100644 index 000000000..6cf188b2d --- /dev/null +++ b/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +. /etc/formfactor/config + +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 + # 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 && $CMD & +fi diff --git a/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/single-instance.patch b/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/single-instance.patch new file mode 100644 index 000000000..18b6c4174 --- /dev/null +++ b/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/single-instance.patch @@ -0,0 +1,23 @@ +Multiple matchbox-keyboard instances would occupy whole screen and cause X +window segfault(Bug 509). Making matchbox-keyboard singleton is one work +around. + +This patch allow only one instance of matchbox-keyboard based on some mechanism +in matchbox-desktop. In future, an applet and GTK-IM modules in +matchbox-keyboard can be used to automatically map/unmap the virtual keyboard +on demand. + +Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> + +Upstream-Status: Inappropriate [configuration] + +Index: matchbox-keyboard/matchbox-keyboard.desktop +=================================================================== +--- matchbox-keyboard.orig/matchbox-keyboard.desktop 2010-12-22 20:41:40.000000000 +0800 ++++ matchbox-keyboard/matchbox-keyboard.desktop 2010-12-22 20:42:12.000000000 +0800 +@@ -6,3 +6,5 @@ + Icon=matchbox-keyboard.png + Categories=Panel;Utility;MB + X-MB-INPUT-MECHANSIM=True ++X-MB-SingleInstance=true ++StartupNotify=true diff --git a/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb b/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb new file mode 100644 index 000000000..0d321d399 --- /dev/null +++ b/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb @@ -0,0 +1,56 @@ +SUMMARY = "Matchbox virtual keyboard for X11" +HOMEPAGE = "http://matchbox-project.org" +BUGTRACKER = "http://bugzilla.yoctoproject.org/" +SECTION = "x11" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://src/matchbox-keyboard.h;endline=17;md5=9d6586c69e4a926f3cb0b4425f24ba3c \ + file://applet/applet.c;endline=18;md5=4a0f721724746b14d95b51ddd42b95e7" + +DEPENDS = "libfakekey expat libxft gtk+ matchbox-panel-2" + +SRCREV = "217f1bfe14c41cf7e291d04a63aa2d79cc13d063" +PV = "0.0+git${SRCPV}" +PR = "r4" + +SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \ + file://single-instance.patch \ + file://80matchboxkeyboard.sh" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig gettext gtk-immodules-cache distro_features_check + +# The libxft, libfakekey and matchbox-panel-2 requires x11 in DISTRO_FEATURES +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECONF = "--disable-cairo --enable-gtk-im --enable-applet" + +PACKAGES += "${PN}-im ${PN}-applet" + +FILES_${PN} = "${bindir}/ \ + ${sysconfdir} \ + ${datadir}/applications \ + ${datadir}/pixmaps \ + ${datadir}/matchbox-keyboard" + +FILES_${PN}-dbg += "${libdir}/gtk-2.0/*/immodules/.debug" + +FILES_${PN}-im = "${libdir}/gtk-2.0/*/immodules/*.so" + +FILES_${PN}-applet = "${libdir}/matchbox-panel/*.so" + + +do_install_append () { + install -d ${D}/${sysconfdir}/X11/Xsession.d/ + install -m 755 ${WORKDIR}/80matchboxkeyboard.sh ${D}/${sysconfdir}/X11/Xsession.d/ + + rm -f ${D}${libdir}/gtk-2.0/*/immodules/*.la + rm -f ${D}${libdir}/matchbox-panel/*.la +} + +GTKIMMODULES_PACKAGES = "${PN}-im" + +RDEPENDS_${PN} = "formfactor dbus-wait" +RRECOMMENDS_${PN} = "${PN}-applet" |