summaryrefslogtreecommitdiff
path: root/recipes/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch')
-rw-r--r--recipes/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch99
1 files changed, 99 insertions, 0 deletions
diff --git a/recipes/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch b/recipes/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch
new file mode 100644
index 0000000000..c8cb76d99e
--- /dev/null
+++ b/recipes/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;
+ }