summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-11-09 13:53:08 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-11-09 13:53:08 +0000
commit6980eb0bc702571122542e9771bdafc88c3fae1e (patch)
tree3411fda8200c893a858fbda6e0e0b8b9c59f402e /src
parent7728f47f3f0e27798cb528d26b982c5aebe6c4eb (diff)
downloadenlightenment-6980eb0bc702571122542e9771bdafc88c3fae1e.tar.gz
e: improve usability of WBOD.
SVN revision: 79023
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_alert_main.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c
index 1333f24b4d..71344bd265 100644
--- a/src/bin/e_alert_main.c
+++ b/src/bin/e_alert_main.c
@@ -12,7 +12,9 @@
#include <Ecore.h>
#include <Ecore_Ipc.h>
#include <xcb/xcb.h>
+#include <xcb/xcb_keysyms.h>
#include <xcb/shape.h>
+#include <X11/keysym.h>
#define WINDOW_WIDTH 320
#define WINDOW_HEIGHT 240
@@ -93,7 +95,7 @@ main(int argc, char **argv)
title = "Enlightenment Error";
str1 = "(F1) Recover";
- str2 = "(F2) Exit";
+ str2 = "(F12) Logout";
_e_alert_create();
_e_alert_display();
@@ -422,15 +424,23 @@ _e_alert_draw(void)
static int
_e_alert_handle_key_press(xcb_generic_event_t *event)
{
+ xcb_key_symbols_t *symbols;
xcb_key_press_event_t *ev;
+ xcb_keysym_t key;
+ int r = 0;
ev = (xcb_key_press_event_t *)event;
- if (ev->detail == 67) // F1
- return 1;
- else if (ev->detail == 68) // F2
- return 2;
- else
- return 0;
+ symbols = xcb_key_symbols_alloc(conn);
+ key = xcb_key_symbols_get_keysym(symbols, ev->detail, 0);
+
+ if (key == XK_F1)
+ r = 1;
+ else if (key == XK_F12)
+ r = 2;
+
+ xcb_key_symbols_free(symbols);
+
+ return r;
}
static int