From: Jaehoon Jeong Date: Tue, 6 Oct 2015 09:11:09 +0000 (+0900) Subject: x11: Remove xkb feature from x11-input X-Git-Tag: accepted/tizen/mobile/20151221.050925~34^2~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af42e6f68470d6f3fba0f4b78c9816ec7228b059;p=platform%2Fcore%2Fuifw%2Fpepper.git x11: Remove xkb feature from x11-input Change-Id: I5cc682e8786afc63a965a408773fa07cea5ef05d --- diff --git a/configure.ac b/configure.ac index d63de54..5f4387b 100644 --- a/configure.ac +++ b/configure.ac @@ -135,7 +135,7 @@ AC_ARG_ENABLE(x11, AM_CONDITIONAL(ENABLE_X11, test x$enable_x11 = xyes) if test x$enable_x11 = xyes; then - PEPPER_X11_REQUIRES="x11 xcb-shm x11-xcb xkbcommon xkbcommon-x11" + PEPPER_X11_REQUIRES="x11 xcb-shm x11-xcb" PKG_CHECK_MODULES(PEPPER_X11, [$PEPPER_X11_REQUIRES]) PEPPER_X11_REQUIRES="$PEPPER_X11_REQUIRES pepper pepper-render" diff --git a/src/lib/x11/x11-input.c b/src/lib/x11/x11-input.c index 2a21039..347f6db 100644 --- a/src/lib/x11/x11-input.c +++ b/src/lib/x11/x11-input.c @@ -46,7 +46,7 @@ x11_handle_input_event(x11_seat_t* seat, uint32_t type, xcb_generic_event_t* xev event.id = PEPPER_EVENT_KEYBOARD_KEY; event.time = kp->time; - event.key = xkb_state_key_get_one_sym(seat->xkb_state, kp->detail); + event.key = kp->detail - 8; event.state = PEPPER_KEY_STATE_PRESSED; pepper_object_emit_event((pepper_object_t *)seat->keyboard, @@ -59,7 +59,7 @@ x11_handle_input_event(x11_seat_t* seat, uint32_t type, xcb_generic_event_t* xev event.id = PEPPER_EVENT_KEYBOARD_KEY; event.time = kr->time; - event.key = xkb_state_key_get_one_sym(seat->xkb_state, kr->detail); + event.key = kr->detail - 8; event.state = PEPPER_KEY_STATE_RELEASED; pepper_object_emit_event((pepper_object_t *)seat->keyboard, @@ -146,15 +146,6 @@ x11_seat_destroy(void *data) if (seat->conn) seat->conn->seat = NULL; - if (seat->xkb_state) - xkb_state_unref(seat->xkb_state); - - if (seat->keymap) - xkb_keymap_unref(seat->keymap); - - if (seat->xkb_ctx) - xkb_context_unref(seat->xkb_ctx); - free(seat); } @@ -187,42 +178,6 @@ pepper_x11_input_create(pepper_x11_connection_t* conn) seat->id = X11_BACKEND_INPUT_ID; - /* Init XKB extension */ - seat->xkb_ctx = xkb_context_new(XKB_CONTEXT_NO_FLAGS); - if (!seat->xkb_ctx) - { - PEPPER_ERROR("xkb_context_new failed\n"); - - goto failed; - } - - seat->device_id = xkb_x11_get_core_keyboard_device_id(conn->xcb_connection); - if (seat->device_id == -1) - { - PEPPER_ERROR("xkb_x11_get_core_keyboard_device_id failed\n"); - - goto failed; - } - - seat->keymap = xkb_x11_keymap_new_from_device(seat->xkb_ctx, - conn->xcb_connection, - seat->device_id, - XKB_KEYMAP_COMPILE_NO_FLAGS); - if (!seat->keymap) - { - PEPPER_ERROR("xkb_x11_keymap_new_from_device failed\n"); - - goto failed; - } - - seat->xkb_state = xkb_x11_state_new_from_device(seat->keymap, conn->xcb_connection, seat->device_id); - if (!seat->xkb_state) - { - PEPPER_ERROR("xkb_x11_state_new_from_device failed\n"); - - goto failed; - } - /* Hard-coded: */ seat->pointer = pepper_input_device_create(conn->compositor, WL_SEAT_CAPABILITY_POINTER, NULL, NULL); diff --git a/src/lib/x11/x11-internal.h b/src/lib/x11/x11-internal.h index 2427e2c..3db4373 100644 --- a/src/lib/x11/x11-internal.h +++ b/src/lib/x11/x11-internal.h @@ -5,8 +5,6 @@ #include #include -#include -#include #include #include #include @@ -75,11 +73,6 @@ struct x11_seat uint32_t caps; char *name; - struct xkb_context *xkb_ctx; - int32_t device_id; - struct xkb_keymap *keymap; - struct xkb_state *xkb_state; - pepper_list_t link; struct wl_listener conn_destroy_listener;