[SDL_Tizen] Improve indicator functions
[platform/upstream/SDL.git] / src / video / tizen / SDL_tizenmouse.c
index 21c416d..bb196c4 100755 (executable)
@@ -286,6 +286,17 @@ _tizen_cb_event_mousedown_change(void *data, int type, void *event)
     int x = 0, y = 0;
     _tizen_get_mouseXY(window, (int)e->x, (int)e->y, &x, &y);
 
+    SDL_VideoData* videoData = SDL_GetVideoDevice()->driverdata;
+    SDL_WindowData *wind = window->driverdata;
+    if(x >= 0 && x <= window->w && y >= 0 && y <= videoData->indicator_height)
+    {
+        if(!videoData->indicator_visible && wind->support_indicator)
+        {
+            videoData->indicator_parent_id = wind->id;
+            _tizen_ecore_ipc_client_send(OP_INDICATOR_SHOW, wind->rotation, wind->g_res_id, 0);
+        }
+    }
+
     SDL_SendMouseMotion(window, 0, 0, x, y);
     SDL_SendMouseButton(window, 0, SDL_PRESSED, SDL_BUTTON_LEFT);
 
@@ -307,6 +318,14 @@ _tizen_cb_event_mouseup_change(void *data, int type, void *event)
     ew = ecore_wl_window_find(e->window);
     window = Tizen_FindWindow(_this, ew);
 
+    SDL_VideoData* videoData = SDL_GetVideoDevice()->driverdata;
+    SDL_WindowData *wind = window->driverdata;
+
+    if(videoData->indicator_on && wind->support_indicator && videoData->indicator_visible)
+    {
+        _tizen_quickpanel_on(window->driverdata);
+    }
+
     int x = 0, y = 0;
     _tizen_get_mouseXY(window, (int)e->x, (int)e->y, &x, &y);
     SDL_SendMouseMotion(window, 0, 0, x, y);