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;
}