From: huiyu.eun Date: Tue, 4 Jul 2017 06:32:28 +0000 (+0900) Subject: [SDL_Tizen] Get a wayland window resource id X-Git-Tag: accepted/tizen/unified/20170710.154330~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F22%2F137022%2F2;p=platform%2Fupstream%2FSDL.git [SDL_Tizen] Get a wayland window resource id Get a window resouce id using ECORE_WL_EVENT_WINDOW_SHOW event callback. after that send id to indicator. Change-Id: Idd2473ff53951095ec660cd2e50dbfa919a25e03 Signed-off-by: huiyu.eun --- diff --git a/src/video/tizen/SDL_tizenwindow.c b/src/video/tizen/SDL_tizenwindow.c index 7811e2f..fccf554 100755 --- a/src/video/tizen/SDL_tizenwindow.c +++ b/src/video/tizen/SDL_tizenwindow.c @@ -118,7 +118,7 @@ static Eina_Bool _cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, vo int window_w, window_h; ecore_wl_screen_size_get(&window_w, &window_h); - _tizen_ecore_ipc_client_send(OP_INDICATOR_SHOW, wind->rotation, 0, videoData->indicator_mode); + _tizen_ecore_ipc_client_send(OP_INDICATOR_SHOW, wind->rotation, wind->g_res_id, videoData->indicator_mode); return ECORE_CALLBACK_DONE; } @@ -856,6 +856,27 @@ _tizen_cb_event_window_rotate(void *data, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_PASS_ON; } +static Eina_Bool _tizen_cb_event_window_show(void *data, int type, void *event) +{ + Ecore_Wl_Event_Window_Show *e; + uint32_t g_res_id = 0; + + e = event; + if (e->data[0] > 0) + g_res_id = e->data[0]; + + if(g_res_id!=0) + { + SDL_VideoData *this = SDL_GetVideoDevice()->driverdata; + SDL_Window * window = (SDL_Window*)eina_hash_find(this->windows, &e->win); + SDL_WindowData *wind = window->driverdata; + wind->g_res_id = g_res_id; + SDL_Log("[SDL] SDL Window Resource ID %d", g_res_id); + } + + return ECORE_CALLBACK_PASS_ON; +} + int Tizen_InitWindow(_THIS) { @@ -869,6 +890,8 @@ Tizen_InitWindow(_THIS) _tizen_cb_event_window_rotate,_this); ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, _tizen_cb_window_configure,_this); + ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_SHOW, + _tizen_cb_event_window_show, _this); ecore_event_handler_add(ECORE_EVENT_KEY_UP, _tizen_cb_event_keyup_change,_this); diff --git a/src/video/tizen/SDL_tizenwindow.h b/src/video/tizen/SDL_tizenwindow.h index cb0da77..e780a3c 100755 --- a/src/video/tizen/SDL_tizenwindow.h +++ b/src/video/tizen/SDL_tizenwindow.h @@ -33,6 +33,7 @@ #include typedef struct { + uint32_t g_res_id; /* Wayland window resource id */ uint32_t id; /* Ecore wayland window id */ Ecore_Wl_Window *window;