[SDL_Tizen] Fix Indicator issue 30/104830/1
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 14 Dec 2016 10:58:57 +0000 (19:58 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Wed, 14 Dec 2016 11:01:25 +0000 (20:01 +0900)
when doesn't use indicator, off the indicator.

Change-Id: I96b14f4dfbc6a8d993e43e07aae872a09d81058f
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/video/tizen/SDL_tizenopengles.c
src/video/tizen/SDL_tizenwindow.c

index cb5cdc8..89a4164 100755 (executable)
@@ -353,19 +353,16 @@ void Tizen_DrawIndicator(SDL_Window *window)
         ecore_wl_window_rotation_change_done_send(wdata->window);
         wdata->received_rotation = 0;
     }
-
-    if(wdata->last_indicator_showtime + 3000< SDL_GetTicks())
-    {
-        ModelMatrixTranslate(&mMatrix, 0.0f, 0.02f, 0.0f);
-    }
-
-    if(wdata->last_indicator_showtime + 3500 <SDL_GetTicks()) {
-        wdata->indicator_show = SDL_FALSE;
-        _tizen_indicator_event_filter();
-    }
-
     if(!(window->flags & SDL_WINDOW_FULLSCREEN) && !(window->flags & SDL_WINDOW_BORDERLESS) && wdata->indicator_show)
     {
+        if(wdata->last_indicator_showtime + 3000< SDL_GetTicks())
+        {
+            ModelMatrixTranslate(&mMatrix, 0.0f, 0.02f, 0.0f);
+        }
+        if(wdata->last_indicator_showtime + 3500 <SDL_GetTicks()) {
+            wdata->indicator_show = SDL_FALSE;
+            _tizen_indicator_event_filter();
+        }
         GLES2_Context Mainctx;
         LoadContext(&Mainctx);
         Mainctx.glViewport(0, 0, window->w, window->h);
@@ -617,33 +614,33 @@ Tizen_GLES_DeleteContext(_THIS, SDL_GLContext context)
 void
 SDL_IndicatorProcessEvent(SDL_Window *window, int rot)
 {
-    GLES2_Context Mainctx;
-    LoadContext(&Mainctx);
-
     SDL_WindowData *wind = window->driverdata;
+    if(!(window->flags & SDL_WINDOW_FULLSCREEN) && !(window->flags & SDL_WINDOW_BORDERLESS) && wind->indicator_show)
+    {
+        GLES2_Context Mainctx;
+        LoadContext(&Mainctx);
 
-    double ratio = 0.92f;
-    if( rot == 90 || rot ==270)
-        ratio = 0.86f;
-
-    vVertices[4] = vVertices[7] = vVertices[16] = ratio;
-
-    Mainctx.glBindBuffer(GL_ARRAY_BUFFER, indicator_vbo);
-    Mainctx.glBufferData(GL_ARRAY_BUFFER, 18 * 4, vVertices, GL_STATIC_DRAW);
-    Mainctx.glBindBuffer(GL_ARRAY_BUFFER, indicator_ibo);
-    Mainctx.glBufferData(GL_ARRAY_BUFFER, 12 * 4, vCoord, GL_STATIC_DRAW);
+        double ratio = 0.92f;
+        if( rot == 90 || rot ==270)
+            ratio = 0.86f;
 
-    ModelMatrixLoadIdentity(&mMatrix);
+        vVertices[4] = vVertices[7] = vVertices[16] = ratio;
 
-    if (!wind->support_pre_rotation)
-        rotate_indicator(&mMatrix, 0, 0, rot);
+        Mainctx.glBindBuffer(GL_ARRAY_BUFFER, indicator_vbo);
+        Mainctx.glBufferData(GL_ARRAY_BUFFER, 18 * 4, vVertices, GL_STATIC_DRAW);
+        Mainctx.glBindBuffer(GL_ARRAY_BUFFER, indicator_ibo);
+        Mainctx.glBufferData(GL_ARRAY_BUFFER, 12 * 4, vCoord, GL_STATIC_DRAW);
 
-    wind->indicator_show = SDL_TRUE;
-    wind->last_indicator_showtime = SDL_GetTicks();
+        ModelMatrixLoadIdentity(&mMatrix);
 
+        if (!wind->support_pre_rotation)
+            rotate_indicator(&mMatrix, 0, 0, rot);
 
-    _tizen_indicator_event_filter();
+        wind->indicator_show = SDL_TRUE;
+        wind->last_indicator_showtime = SDL_GetTicks();
 
+        _tizen_indicator_event_filter();
+    }
 }
 
 #endif /* SDL_VIDEO_DRIVER_TIZEN && SDL_VIDEO_OPENGL_EGL */
index 6c14ea7..adc1e65 100755 (executable)
@@ -349,7 +349,7 @@ _tizen_setwindowsize(SDL_Window *window)
     if (!wind->window) {
         return;
     }
-    ecore_wl_window_update_size(wind->window, window->w, window->h);
+//    ecore_wl_window_update_size(wind->window, window->w, window->h);
 }
 
 void
@@ -519,6 +519,8 @@ _tizen_cb_event_window_rotate(void *data, int type EINA_UNUSED, void *event)
             wl_egl_window_get_attached_size(wind->egl_window, &aw, &ah);
             wl_egl_window_resize(wind->egl_window, aw, ah, 0, 0);
 
+            SDL_Log("[SDL_Size] * _tizen_cb_event_window_rotate aw ah : %d, %d", aw, ah);
+
             if(wind->rotation == 90 || wind->rotation == 270)
                 SDL_SetWindowSize(window, ah, aw);
             else