summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-sato/matchbox-keyboard/files
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-sato/matchbox-keyboard/files')
-rw-r--r--yocto-poky/meta/recipes-sato/matchbox-keyboard/files/80matchboxkeyboard.sh21
-rw-r--r--yocto-poky/meta/recipes-sato/matchbox-keyboard/files/single-instance.patch23
2 files changed, 44 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