summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2017-12-06 11:53:06 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2017-12-06 14:23:44 +0900
commit6a6685ab21e70fb0f35a0f10ffbad6efe285620d (patch)
tree17ef041f8f5cebe6b0a712efe541be1584bb3328
parent54ae9cc18b6c0fdb9a10f03ad2681587ca062c6c (diff)
elm: Fix _elm_widget_onscreen_is for window
A window is using ecore_evas geometry value for its evas_object geometry value. The evas_output_viewport x(y) value which is used in _elm_widget_onscreen_is is always 0. So _elm_widget_onscreen_is could return EINA_FALSE, if ecore_evas geometry x(y) value is bigger than 0, even though a window object is on screen. So it is not correct to compare ecore_output_viewport and evas_object geometry for a window object. Moreover it does not make sense.
-rw-r--r--src/lib/elementary/elm_widget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 5f9a4eb18b..7b7497b045 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -3881,6 +3881,10 @@ _elm_widget_onscreen_is(Evas_Object *widget)
3881 if (eina_rectangle_is_empty(&r1)) 3881 if (eina_rectangle_is_empty(&r1))
3882 return EINA_FALSE; 3882 return EINA_FALSE;
3883 3883
3884 // window does not have to check viewport and geometry
3885 if (efl_isa(widget, EFL_ACCESS_WINDOW_INTERFACE))
3886 return EINA_TRUE;
3887
3884 // check if on canvas 3888 // check if on canvas
3885 evas_output_viewport_get(evas, &r2.x, &r2.y, &r2.w, &r2.h); 3889 evas_output_viewport_get(evas, &r2.x, &r2.y, &r2.w, &r2.h);
3886 if (!eina_rectangles_intersect(&r1, &r2)) 3890 if (!eina_rectangles_intersect(&r1, &r2))