diff options
Diffstat (limited to 'daemon/service/keyboard.c')
-rwxr-xr-x[-rw-r--r--] | daemon/service/keyboard.c | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/daemon/service/keyboard.c b/daemon/service/keyboard.c index 94882ea..946cc79 100644..100755 --- a/daemon/service/keyboard.c +++ b/daemon/service/keyboard.c @@ -15,13 +15,23 @@ * */ +#include <Elementary.h> #include <vconf.h> -#ifdef HAVE_X -#include <utilX.h> -#include <X11/Xlib.h> -#endif #include <Ecore_Input.h> #include <feedback.h> +#include <tzsh.h> +#include <tzsh_quickpanel_service.h> +#include <notification.h> + +#if defined(WINSYS_X11) +#include <Ecore_X.h> +#include <X11/Xlib.h> +#include <utilX.h> +#endif +#include <E_DBus.h> + +#include "quickpanel-ui.h" // appdata +#include "common_uic.h" #include "common.h" #include "noti_util.h" #include "keyboard.h" @@ -84,9 +94,11 @@ HAPI void quickpanel_keyboard_init(void *data) Ecore_Event_Handler *hdl_key_up = NULL; retif(ad == NULL, , "Invalid parameter!"); - if (elm_win_keygrab_set(elm_win_xwindow_get(ad->win), KEY_QUICKPANEL, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED) != 0) { +#if defined(WINSYS_X11) + if (utilx_grab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_QUICKPANEL, SHARED_GRAB) != 0) { ERR("failed to grab KEY_QUICKPANEL"); } +#endif hdl_key_down = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _service_hardkey_down_cb, ad); if (hdl_key_down == NULL) { @@ -117,10 +129,11 @@ HAPI void quickpanel_keyboard_fini(void *data) ad->hdl_hardkey_down = NULL; } - if (elm_win_keygrab_unset(elm_win_xwindow_get(ad->win), KEY_QUICKPANEL, 0, 0) != 0) { +#if defined(WINSYS_X11) + if (utilx_ungrab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_QUICKPANEL) != 0) { ERR("failed to ungrab KEY_QUICKPANEL"); } - +#endif } HAPI void quickpanel_keyboard_openning_init(void *data) @@ -128,17 +141,19 @@ HAPI void quickpanel_keyboard_openning_init(void *data) struct appdata *ad = data; retif(ad == NULL, , "Invalid parameter!"); - if (elm_win_keygrab_set(elm_win_xwindow_get(ad->win), KEY_BACK, 0, 0, 0, ELM_WIN_KEYGRAB_EXCLUSIVE ) != 0) { +#if defined(WINSYS_X11) + if (utilx_grab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_BACK, EXCLUSIVE_GRAB) != 0) { ERR("failed to grab KEY_BACK"); } - if (elm_win_keygrab_set(elm_win_xwindow_get(ad->win), KEY_MENU, 0, 0, 0, ELM_WIN_KEYGRAB_EXCLUSIVE ) != 0) { + if (utilx_grab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_MENU, EXCLUSIVE_GRAB) != 0) { ERR("failed to grab KEY_MENU"); } - if (elm_win_keygrab_set(elm_win_xwindow_get(ad->win), KEY_HOME, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED) != 0) { + if (utilx_grab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_HOME, SHARED_GRAB) != 0) { ERR("failed to grab KEY_HOME"); } +#endif } HAPI void quickpanel_keyboard_closing_fini(void *data) @@ -146,15 +161,17 @@ HAPI void quickpanel_keyboard_closing_fini(void *data) struct appdata *ad = data; retif(ad == NULL, , "Invalid parameter!"); - if (elm_win_keygrab_unset(elm_win_xwindow_get(ad->win), KEY_BACK ,0 ,0) != 0) { +#if defined(WINSYS_X11) + if (utilx_ungrab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_BACK) != 0) { ERR("failed to ungrab KEY_BACK"); } - if (elm_win_keygrab_unset(elm_win_xwindow_get(ad->win), KEY_MENU ,0 ,0) != 0) { + if (utilx_ungrab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_MENU) != 0) { ERR("failed to ungrab KEY_MENU"); } - if (elm_win_keygrab_unset(elm_win_xwindow_get(ad->win), KEY_HOME ,0 ,0) != 0) { + if (utilx_ungrab_key(ecore_x_display_get(), elm_win_xwindow_get(ad->win), KEY_HOME) != 0) { ERR("failed to ungrab KEY_HOME"); } +#endif } |