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.
This commit is contained in:
Shinwoo Kim 2017-12-06 11:53:06 +09:00
parent 54ae9cc18b
commit 6a6685ab21
1 changed files with 4 additions and 0 deletions

View File

@ -3881,6 +3881,10 @@ _elm_widget_onscreen_is(Evas_Object *widget)
if (eina_rectangle_is_empty(&r1))
return EINA_FALSE;
// window does not have to check viewport and geometry
if (efl_isa(widget, EFL_ACCESS_WINDOW_INTERFACE))
return EINA_TRUE;
// check if on canvas
evas_output_viewport_get(evas, &r2.x, &r2.y, &r2.w, &r2.h);
if (!eina_rectangles_intersect(&r1, &r2))