Modification for enlightenment version upgrade 0.20.0 56/57656/1 accepted/tizen/mobile/20160122.034536 accepted/tizen/tv/20160122.034558 accepted/tizen/wearable/20160122.034615 submit/tizen/20160121.104248
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 12 Jan 2016 08:08:39 +0000 (17:08 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 21 Jan 2016 10:31:09 +0000 (19:31 +0900)
Change-Id: Ib8f948f18e9ad48f433d33777e7dd6d55d6e9d79

configure.ac
src/e_mod_keyrouter_events.c
src/e_mod_keyrouter_list.c
src/e_mod_main.c
src/e_mod_main.h
src/e_mod_main_wl.c
src/e_mod_main_wl.h

index 3e75c67..d9f4106 100644 (file)
@@ -106,6 +106,11 @@ if test "x${have_wayland_only}" != "xno"; then
   AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
 fi
 
+# to include e_comp_wl.h
+if test "x${have_wayland_only}" != "xno"; then
+  AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
+fi
+
 dnl ========================================================================
 # checks for wayland only argument
 dnl ========================================================================
index 43ef4ab..81ae68d 100644 (file)
@@ -11,8 +11,8 @@ static void _e_keyrouter_send_key_event(int type, struct wl_resource *surface, s
 static Eina_Bool _e_keyrouter_send_key_events_register(int type, Ecore_Event_Key *ev);
 
 static Eina_Bool _e_keyrouter_is_key_grabbed(int key);
-static Eina_Bool _e_keyrouter_check_top_visible_window(E_Comp *c, E_Client *ec_focus, int arr_idx);
-static void _e_keyrouter_find_top_register_window(E_Comp *c, int arr_idx);
+static Eina_Bool _e_keyrouter_check_top_visible_window(E_Client *ec_focus, int arr_idx);
+static void _e_keyrouter_find_top_register_window(int arr_idx);
 
 static Eina_Bool
 _e_keyrouter_is_key_grabbed(int key)
@@ -116,7 +116,6 @@ _e_keyrouter_send_key_events_press(int type, Ecore_Event_Key *ev)
    unsigned int keycode = ev->keycode;
    struct wl_resource *surface_focus = NULL;
    E_Client *ec_focus = NULL;
-   E_Comp *c = NULL;
 
    E_Keyrouter_Key_List_NodePtr key_node_data;
    Eina_List *l = NULL;
@@ -165,8 +164,7 @@ _e_keyrouter_send_key_events_press(int type, Ecore_Event_Key *ev)
                     }
                   krt->isWindowStackChanged = EINA_FALSE;
 
-                  c = e_comp_find_by_window(ev->window);
-                  if (_e_keyrouter_check_top_visible_window(c, ec_focus, keycode))
+                  if (_e_keyrouter_check_top_visible_window(ec_focus, keycode))
                     {
                        _e_keyrouter_send_key_event(type, key_node_data->surface, NULL, ev);
                        KLDBG("TOPMOST (TOP_POSITION) Mode : Key %s (%d) ===> Surface (%p)\n",
@@ -225,7 +223,6 @@ static Eina_Bool
 _e_keyrouter_send_key_events_register(int type, Ecore_Event_Key *ev)
 {
    unsigned int keycode = ev->keycode;
-   E_Comp *c = NULL;
 
    if (!krt->HardKeys[keycode].registered_ptr)
      {
@@ -241,13 +238,13 @@ _e_keyrouter_send_key_events_register(int type, Ecore_Event_Key *ev)
 }
 
 static Eina_Bool
-_e_keyrouter_check_top_visible_window(E_Comp *c, E_Client *ec_focus, int arr_idx)
+_e_keyrouter_check_top_visible_window(E_Client *ec_focus, int arr_idx)
 {
    E_Client *ec_top = NULL;
    Eina_List *l = NULL, *l_next = NULL;
    E_Keyrouter_Key_List_NodePtr key_node_data = NULL;
 
-   ec_top = e_client_top_get(c);
+   ec_top = e_client_top_get();
    KLDBG("Top Client: %p\n", ec_top);
 
    while (ec_top)
@@ -264,7 +261,7 @@ _e_keyrouter_check_top_visible_window(E_Comp *c, E_Client *ec_focus, int arr_idx
           {
              if (key_node_data)
                {
-                  if (ec_top == e_pixmap_client_get(wl_resource_get_user_data(key_node_data->surface)))
+                  if (ec_top == wl_resource_get_user_data(key_node_data->surface))
                     {
                        krt->HardKeys[arr_idx].top_ptr = eina_list_promote_list(krt->HardKeys[arr_idx].top_ptr, l);
                        KLDBG("Move a client(%p) to first index of list(key: %d)\n",
@@ -322,8 +319,8 @@ _e_keyrouter_send_key_event(int type, struct wl_resource *surface, struct wl_cli
         evtype = WL_KEYBOARD_KEY_STATE_RELEASED;
      }
 
-   serial = wl_display_next_serial(krt->cdata->wl.disp);
-   EINA_LIST_FOREACH(krt->cdata->kbd.resources, l, res)
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
+   EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
      {
         if (res)
           {
index 1481bdc..9433981 100644 (file)
@@ -458,7 +458,7 @@ _e_keyrouter_build_register_list(void)
    struct wl_resource *surface = NULL;
    Eina_Bool below_focus = EINA_FALSE;
 
-   ec_top = e_client_top_get(e_comp);
+   ec_top = e_client_top_get();
    ec_focus = e_client_focused_get();
 
    while (ec_top)
index 3155a61..eeaa529 100644 (file)
@@ -5,11 +5,11 @@
 #define LOG_TAG        "KEYROUTER"
 #include "dlog.h"
 
-EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
+E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
 
 KeyRouter krt;
 
-EAPI void *
+E_API void *
 e_modapi_init(E_Module *m)
 {
    if (!_e_keyrouter_init()) return NULL;
@@ -28,7 +28,7 @@ e_modapi_init(E_Module *m)
    return m;
 }
 
-EAPI int
+E_API int
 e_modapi_shutdown(E_Module *m EINA_UNUSED)
 {
    Ecore_Event_Handler *h = NULL;
@@ -46,7 +46,7 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
    return 1;
 }
 
-EAPI int
+E_API int
 e_modapi_save(E_Module *m EINA_UNUSED)
 {
    /* Save something to be kept */
index 2cd6128..27c0545 100644 (file)
 #include <utilX.h>
 
 /*** E Module ***/
-EAPI extern E_Module_Api e_modapi;
+E_API extern E_Module_Api e_modapi;
 
-EAPI void *e_modapi_init(E_Module *m);
-EAPI int   e_modapi_shutdown(E_Module *m);
-EAPI int   e_modapi_save(E_Module *m);
+E_API void *e_modapi_init(E_Module *m);
+E_API int   e_modapi_shutdown(E_Module *m);
+E_API int   e_modapi_save(E_Module *m);
 
 /* maximum number of hardkeys */
 #define MIN_KEYCODE    8
index e51c182..d7fa326 100644 (file)
@@ -4,7 +4,7 @@
 #include <string.h>
 
 E_KeyrouterPtr krt = NULL;
-EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
+E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
 
 static E_Keyrouter_Config_Data *_e_keyrouter_init(E_Module *m);
 static void _e_keyrouter_init_handlers(void);
@@ -366,16 +366,6 @@ _e_keyrouter_init(E_Module *m)
         goto err;
      }
 
-   E_Comp_Data *cdata = e_comp->wl_comp_data;
-
-   if (!cdata)
-     {
-        KLDBG("Failed to get wl_comp_data ! (e_comp->wl_comp_data == NULL)\n");
-        goto err;
-     }
-
-   krt->cdata = cdata;
-
    kconfig = E_NEW(E_Keyrouter_Config_Data, 1);
    EINA_SAFETY_ON_NULL_GOTO(kconfig, err);
 
@@ -393,7 +383,7 @@ _e_keyrouter_init(E_Module *m)
    krt->ef_handler = ecore_event_filter_add(NULL, _event_filter, NULL, NULL);
    _e_keyrouter_init_handlers();
 
-   krt->global = wl_global_create(cdata->wl.disp, &tizen_keyrouter_interface, 1, krt, _e_keyrouter_cb_bind);
+   krt->global = wl_global_create(e_comp_wl->wl.disp, &tizen_keyrouter_interface, 1, krt, _e_keyrouter_cb_bind);
    if (!krt->global)
      {
         KLDBG("Failed to create global !\n");
@@ -415,13 +405,13 @@ err:
    return NULL;
 }
 
-EAPI void *
+E_API void *
 e_modapi_init(E_Module *m)
 {
    return _e_keyrouter_init(m);
 }
 
-EAPI int
+E_API int
 e_modapi_shutdown(E_Module *m)
 {
    E_Keyrouter_Config_Data *kconfig = m->data;
@@ -432,7 +422,7 @@ e_modapi_shutdown(E_Module *m)
    return 1;
 }
 
-EAPI int
+E_API int
 e_modapi_save(E_Module *m)
 {
    /* Save something to be kept */
index 6729a66..d4278ba 100644 (file)
@@ -77,7 +77,6 @@ struct _E_Keyrouter_Grabbed_Key
 
 struct _E_Keyrouter
 {
-   E_Comp_Data *cdata;
    struct wl_global *global;
    Ecore_Event_Filter *ef_handler;
    Eina_List *handlers;
@@ -107,10 +106,10 @@ struct _E_Keyrouter_Grab_Result {
 
 
 /* E Module */
-EAPI extern E_Module_Api e_modapi;
-EAPI void *e_modapi_init(E_Module *m);
-EAPI int   e_modapi_shutdown(E_Module *m);
-EAPI int   e_modapi_save(E_Module *m);
+E_API extern E_Module_Api e_modapi;
+E_API void *e_modapi_init(E_Module *m);
+E_API int   e_modapi_shutdown(E_Module *m);
+E_API int   e_modapi_save(E_Module *m);
 
 int e_keyrouter_set_keygrab_in_list(struct wl_resource *surface, struct wl_client *client, uint32_t key, uint32_t mode);
 int e_keyrouter_prepend_to_keylist(struct wl_resource *surface, struct wl_client *wc, uint32_t key, uint32_t mode);