From 0729d2aea973978ab5451573ee79dc08ae57f17e Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Thu, 27 Oct 2016 19:07:11 +0900 Subject: [PATCH] Fix widget resume/pause event Check rotation and also height for resume/pause Change-Id: I1b558892de0da7d1792065a05495626b9f54b98e Signed-off-by: Hyunho Kang --- widget_toolkit/src/compositor.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/widget_toolkit/src/compositor.c b/widget_toolkit/src/compositor.c index e17c71f..2a3db94 100644 --- a/widget_toolkit/src/compositor.c +++ b/widget_toolkit/src/compositor.c @@ -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; } -- 2.7.4