int ret = MM_ERROR_NONE;
Ecore_Wl_Window *window = NULL;
struct wl_display *display = NULL;
- struct wl_display *display_wrapper = NULL;
struct wl_surface *surface = NULL;
struct wl_registry *registry = NULL;
- struct wl_event_queue *queue = NULL;
struct tizen_surface *tz_surface = NULL;
struct tizen_resource *tz_resource = NULL;
goto _DONE;
}
- display_wrapper = wl_proxy_create_wrapper(display);
- if (!display_wrapper) {
- LOGE("failed to create wl display wrapper");
- ret = MM_ERROR_UNKNOWN;
- goto _DONE;
- }
-
- queue = wl_display_create_queue(display);
- if (!queue) {
- LOGE("failed to create wl display queue");
- ret = MM_ERROR_UNKNOWN;
- goto _DONE;
- }
-
- wl_proxy_set_queue((struct wl_proxy *)display_wrapper, queue);
-
- registry = wl_display_get_registry(display_wrapper);
+ registry = wl_display_get_registry(display);
if (!registry) {
LOGE("failed to get wayland registry");
ret = MM_ERROR_UNKNOWN;
wl_registry_add_listener(registry, &_mm_display_wl_registry_listener, &tz_surface);
- wl_display_dispatch_queue(display, queue);
- wl_display_roundtrip_queue(display, queue);
+ wl_display_dispatch(display);
+ wl_display_roundtrip(display);
if (!tz_surface) {
LOGE("failed to get tizen surface");
goto _DONE;
}
- /* Get parent_id which is unique in a entire systemw. */
+ /* Get parent_id which is unique in a entire system. */
tz_resource = tizen_surface_get_tizen_resource(tz_surface, surface);
if (!tz_resource) {
LOGE("failed to get tizen resurce");
tizen_resource_add_listener(tz_resource, &_mm_display_tz_resource_listener, parent_id);
- wl_display_roundtrip_queue(display, queue);
+ wl_display_roundtrip(display);
if (*parent_id > 0) {
ret = MM_ERROR_NONE;
registry = NULL;
}
- if (queue) {
- wl_event_queue_destroy(queue);
- queue = NULL;
- }
-
- if (display_wrapper) {
- wl_proxy_wrapper_destroy(display_wrapper);
- display_wrapper = NULL;
- }
-
return ret;
}