From 97f131582e64596b9b1b7bda16dc8cf0e92634eb Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 12 Aug 2015 20:18:43 -0400 Subject: [PATCH] add local event for wl_wl output to use when a global has been received --- src/bin/e_comp_wl.c | 4 ++++ src/bin/e_comp_wl.h | 2 ++ src/modules/wl_wl/wl.c | 1 + 3 files changed, 7 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 12c60ca..6051514 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -8,6 +8,8 @@ #define COMPOSITOR_VERSION 3 +E_API int E_EVENT_WAYLAND_GLOBAL_ADD = -1; + /* Resource Data Mapping: (wl_resource_get_user_data) * * wl_surface == e_pixmap @@ -2676,6 +2678,8 @@ e_comp_wl_init(void) e_desklock_show_hook_add(_e_comp_wl_desklock_show); e_desklock_hide_hook_add(_e_comp_wl_desklock_hide); + E_EVENT_WAYLAND_GLOBAL_ADD = ecore_event_type_new(); + _last_event_time = ecore_loop_time_get(); return EINA_TRUE; diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index e105fa2..15059ed 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -335,6 +335,8 @@ EINTERN Eina_Bool e_comp_wl_key_down(Ecore_Event_Key *ev); EINTERN Eina_Bool e_comp_wl_key_up(Ecore_Event_Key *ev); E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state); +E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD; + # ifndef HAVE_WAYLAND_ONLY EINTERN void e_comp_wl_xwayland_client_queue(E_Client *ec); static inline E_Comp_X_Client_Data * diff --git a/src/modules/wl_wl/wl.c b/src/modules/wl_wl/wl.c index 36f88ce..d137c99 100644 --- a/src/modules/wl_wl/wl.c +++ b/src/modules/wl_wl/wl.c @@ -17,6 +17,7 @@ _wl_handle_global(void *data EINA_UNUSED, struct wl_registry *registry EINA_UNUS if (!strcmp(interface, "wl_shm")) e_comp->wl_comp_data->wl.shm = wl_registry_bind(registry, id, &wl_shm_interface, 1); + ecore_event_add(E_EVENT_WAYLAND_GLOBAL_ADD, NULL, NULL, NULL); } static void -- 2.7.4