Fix widget resume/pause event 84/94184/5 accepted/tizen/common/20161102.121430 accepted/tizen/ivi/20161101.123011 accepted/tizen/mobile/20161101.122911 accepted/tizen/tv/20161101.122936 accepted/tizen/wearable/20161101.122957 submit/tizen/20161101.004208
authorHyunho Kang <hhstark.kang@samsung.com>
Thu, 27 Oct 2016 10:07:11 +0000 (19:07 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Tue, 1 Nov 2016 04:33:36 +0000 (13:33 +0900)
Check rotation and also height for resume/pause

Change-Id: I1b558892de0da7d1792065a05495626b9f54b98e
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
widget_toolkit/src/compositor.c

index e17c71f..2a3db94 100644 (file)
@@ -59,15 +59,27 @@ Ecore_Event_Handler *__visibility_listener = NULL;
 static bool __obj_is_visible(Evas_Object *obj)
 {
        int x, y, w, h;
-       int screen_w, screen_h;
+       int window_x, window_y, window_w, window_h;
+       const char *app_id;
+       int rotation = ecore_wl_window_rotation_get(__window);
+
+       ecore_wl_window_geometry_get(__window, &window_x, &window_y, &window_w, &window_h);
        evas_object_geometry_get(obj, &x, &y, &w, &h);
-       ecore_wl_screen_size_get(&screen_w, &screen_h);
+       app_id = pepper_efl_object_app_id_get(obj);
 
-       if (x >= 0 && x < screen_w) {
-               _D("x %d, y %d w %d h %d, screen_w %d screen_h %d", x, y, w, h, screen_w, screen_h);
+       if (x >= 0 && x < window_w &&
+                       y >= 0 && y < window_h &&
+                       (rotation == 0 || rotation == 180)) {
+               _D("appid %s x %d, y %d w %d h %d, window_w %d window_h %d rotation %d",
+                       app_id, x, y, w, h, window_w, window_h, rotation);
+               return true;
+       } else if (x >= 0 && x < window_h &&
+                       y >= 0 && y < window_w &&
+                       (rotation == 90 || rotation == 270)) {
+               _D("appid %s x %d, y %d w %d h %d, window_w %d window_h %d rotation %d",
+                       app_id, x, y, w, h, window_w, window_h, rotation);
                return true;
        }
-
        return false;
 }