aboutsummaryrefslogtreecommitdiffstats
path: root/packages/matchbox-keyboard
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2007-09-17 15:38:53 +0000
committerDaniel Willmann <daniel@totalueberwachung.de>2007-09-17 15:38:53 +0000
commit5c7ce206e3abebec5d3aa5ca6ff93b75ba0ed7f4 (patch)
tree87fc08cdbf00f11d35aec7d7bf108ce0fd875dc6 /packages/matchbox-keyboard
parent03c6462105b790e7a7229e5e41c7db34a7308665 (diff)
downloadopenembedded-5c7ce206e3abebec5d3aa5ca6ff93b75ba0ed7f4.tar.gz
matchbox-keyboard-inputmethod: Add a patch to delay mb_kbd_ui_hide.
This reduces flicker (i.e. when switching tabs on openmoko-terminal2)
Diffstat (limited to 'packages/matchbox-keyboard')
-rw-r--r--packages/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch99
-rw-r--r--packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb5
2 files changed, 102 insertions, 2 deletions
diff --git a/packages/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch b/packages/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch
new file mode 100644
index 0000000000..c8cb76d99e
--- /dev/null
+++ b/packages/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch
@@ -0,0 +1,99 @@
+Index: matchbox-keyboard/src/matchbox-keyboard.h
+===================================================================
+--- matchbox-keyboard/src/matchbox-keyboard.h (revision 1669)
++++ matchbox-keyboard/src/matchbox-keyboard.h (working copy)
+@@ -285,7 +285,7 @@
+ void
+ mb_kbd_remote_init (MBKeyboardUI *ui);
+
+-void
++int
+ mb_kbd_remote_process_xevents (MBKeyboardUI *ui, XEvent *xevent);
+
+ /**** Keyboard ****/
+Index: matchbox-keyboard/src/matchbox-keyboard-ui.c
+===================================================================
+--- matchbox-keyboard/src/matchbox-keyboard-ui.c (revision 1669)
++++ matchbox-keyboard/src/matchbox-keyboard-ui.c (working copy)
+@@ -1096,6 +1096,8 @@
+ /* Key repeat - values for standard xorg install ( xset q) */
+ int repeat_delay = 100 * 10000;
+ int repeat_rate = 30 * 1000;
++ int hide_delay = 100 * 1000;
++ int to_hide = 0;
+
+ int press_x = 0, press_y = 0;
+
+@@ -1182,11 +1184,42 @@
+ mb_kbd_xembed_process_xevents (ui, &xev);
+
+ if (ui->is_daemon)
+- mb_kbd_remote_process_xevents (ui, &xev);
+-
++ {
++ switch (mb_kbd_remote_process_xevents (ui, &xev))
++ {
++ case 0:
++ if (to_hide == 1) {
++ mb_kbd_ui_hide(ui);
++ }
++ tvt.tv_usec = hide_delay;
++ to_hide = 1;
++ break;
++ case 1:
++ mb_kbd_ui_show(ui);
++ tvt.tv_usec = repeat_delay;
++ to_hide = 0;
++ break;
++ default:
++ if (to_hide == 1) {
++ mb_kbd_ui_hide(ui);
++ tvt.tv_usec = repeat_delay;
++ to_hide = 0;
++ }
++ break;
++ }
++ }
+ }
+ else
+ {
++ /* Hide timed out */
++ if (to_hide == 1)
++ {
++ DBG("Hide timed out, calling mb_kbd_ui_hide");
++ mb_kbd_ui_hide(ui);
++ tvt.tv_usec = repeat_delay;
++ to_hide = 0;
++ }
++
+ /* Keyrepeat */
+ if (mb_kbd_get_held_key(ui->kbd) != NULL)
+ {
+Index: matchbox-keyboard/src/matchbox-keyboard-remote.c
+===================================================================
+--- matchbox-keyboard/src/matchbox-keyboard-remote.c (revision 1669)
++++ matchbox-keyboard/src/matchbox-keyboard-remote.c (working copy)
+@@ -28,7 +28,7 @@
+ "_MB_IM_INVOKER_COMMAND", False);
+ }
+
+-void
++int
+ mb_kbd_remote_process_xevents (MBKeyboardUI *ui, XEvent *xevent)
+ {
+ DBG("got a message\n");
+@@ -42,9 +42,12 @@
+ DBG("got a message of type _MB_IM_INVOKER_COMMAND, val %i\n",
+ xevent->xclient.data.l[0]);
+ if (xevent->xclient.data.l[0] == 1)
+- mb_kbd_ui_show (ui);
++ {
++ return 1;
++ }
+ else
+- mb_kbd_ui_hide (ui);
++ return 0;
+ }
+ }
++ return -1;
+ }
diff --git a/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb b/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb
index b7ef698938..16d5f0e2e6 100644
--- a/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb
+++ b/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb
@@ -6,11 +6,12 @@ RPROVIDES_${PN} = matchbox-keyboard
#DEFAULT_PREFERENCE = "-1"
SECTION = "x11"
PV = "0.0+svnr${SRCREV}"
-PR = "r4"
+PR = "r5"
SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=matchbox-keyboard;proto=http \
file://matchbox-keyboard-applet.patch;patch=1;pnum=0 \
- file://80matchboxkeyboard"
+ file://80matchboxkeyboard \
+ file://matchbox-keyboard-hide-delay.patch;patch=1"
SRC_URI_append_fic-gta01 = " file://fic-gta01-font-size.patch;patch=1"