hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=8f739c0edff98785a630a9825a14561d71a521df

commit 8f739c0edff98785a630a9825a14561d71a521df
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Sun Mar 1 15:57:53 2015 +0900

    bin/main: fix redo/undo operation issue.
    
    suddenly i found ecore key down/up is called twice..
    i don't know reason but seems fd handler triggered this events.
    this could be my system problem if your system doesn't have this,
    please remove this workaround code.
---
 src/bin/main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/bin/main.c b/src/bin/main.c
index 4f7131a..6eb7289 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -22,6 +22,10 @@ main_key_up_cb(void *data, int type EINA_UNUSED, void *ev)
    Ecore_Event_Key *event = ev;
    app_data *ad = data;
 
+   /* FIXME: key_up_cb is called twice, i don't know. seems my x system is
+      broken otherwise please remove this. */
+   if (event->timestamp == 0) return ECORE_CALLBACK_DONE;
+
    if (!strcmp("Control_L", event->key))
      ad->ctrl_pressed = EINA_FALSE;
    else if (!strcmp("Shift_L", event->key))
@@ -698,6 +702,10 @@ main_key_down_cb(void *data, int type EINA_UNUSED, void 
*ev)
    Ecore_Event_Key *event = ev;
    app_data *ad = data;
 
+   /* FIXME: key_down_cb is called twice, i don't know. seems my x system is
+      broken otherwise please remove this. */
+   if (event->timestamp == 0) return ECORE_CALLBACK_DONE;
+
    //Main Menu
    if (!strcmp(event->key, "Escape"))
      {

-- 


Reply via email to