add local event for wl_wl output to use when a global has been received
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 13 Aug 2015 00:18:43 +0000 (20:18 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 13 Aug 2015 00:18:43 +0000 (20:18 -0400)
src/bin/e_comp_wl.c
src/bin/e_comp_wl.h
src/modules/wl_wl/wl.c

index 12c60ca..6051514 100644 (file)
@@ -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;
index e105fa2..15059ed 100644 (file)
@@ -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 *
index 36f88ce..d137c99 100644 (file)
@@ -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