summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaeyoung Kim <ty317.kim@samsung.com>2013-09-14 12:34:08 +0900
committerTaeyoung Kim <ty317.kim@samsung.com>2013-09-14 12:38:17 +0900
commit4be1c31d9602ebdf34d42b8b322fd3dbfbf340be (patch)
tree7d5190114ace42286bff9c3d7070e1c3896aaa0c
parent8cc0b3b60ad87e8e468dc0af22fb4bb23087c275 (diff)
downloadcrash-worker-sdk-4be1c31d9602ebdf34d42b8b322fd3dbfbf340be.tar.gz
crash-worker-sdk-4be1c31d9602ebdf34d42b8b322fd3dbfbf340be.tar.bz2
crash-worker-sdk-4be1c31d9602ebdf34d42b8b322fd3dbfbf340be.zip
Terminate crash popup when BACK key or ESC key on keyboard
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com> Change-Id: I91f0c9f6b0df0f98c22a73709500bd96ba939628
-rw-r--r--crash-popup/src/crash-popup.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/crash-popup/src/crash-popup.c b/crash-popup/src/crash-popup.c
index e169849..c917f63 100644
--- a/crash-popup/src/crash-popup.c
+++ b/crash-popup/src/crash-popup.c
@@ -30,6 +30,8 @@
#include "util_log.h"
#include "crash-popup.h"
+#define KEY_ESC_ON_KEYBOARD "Escape"
+
/**
* callback function of ECORE_EVENT_KEY_DOWN
*/
@@ -37,8 +39,15 @@ static Eina_Bool _ecore_event_key_down_cb(void *data, int type, void *event_info
{
Ecore_Event_Key * kd = (Ecore_Event_Key *) event_info;
- if (0 == strcmp(kd->keyname, KEY_HOME))
- _D("HOME key pressed");
+ _D("%s key pressed", kd->keyname);
+
+ if (0 == strcmp(kd->keyname, KEY_HOME)
+ || 0 == strcmp(kd->keyname, KEY_ESC_ON_KEYBOARD)
+ || 0 == strcmp(kd->keyname, KEY_BACK)) {
+ elm_exit();
+ return EINA_FALSE;
+ }
+
return EINA_TRUE;
}
static void _keygrab(void *data)