aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/elm_widget.c
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 /src/lib/elementary/elm_widget.c
parentedje: rename Edje.Object to Efl.Canvas.Layout (diff)
downloadefl-6a6685ab21e70fb0f35a0f10ffbad6efe285620d.tar.gz
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.
Diffstat (limited to 'src/lib/elementary/elm_widget.c')
-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)
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))