Evas_Coord cx, cy, cw, ch;
Evas_Coord part_height = 0, part_width = 0;
//TIZEN_ONLY(20170405): add window's x,y postion when calculating overlapping size.
- Evas_Coord tx, ty;
+ Evas_Coord tx, ty, tw, th;
+ Evas_Coord nx, ny;
Evas_Object *top;
//
evas_object_geometry_get(obj, &cx, &cy, &cw, &ch);
//TIZEN_ONLY(20170405): add window's x,y postion when calculating overlapping size.
+ ELM_CONFORMANT_DATA_GET(obj, sd);
top = elm_widget_top_get(obj);
- evas_object_geometry_get(top, &tx, &ty, NULL, NULL);
- cx += tx;
- cy += ty;
+ evas_object_geometry_get(top, &tx, &ty, &tw, &th);
+ // position (tx, ty) is based on screen(absolute) coordinates,
+ // but size (tw, th) is based on view port :(
+
+ Evas_Coord ww = 0, wh = 0;
+ elm_win_screen_size_get(top, NULL, NULL, &ww, &wh);
+
+ if (sd->rot == 90)
+ {
+ nx = wh - ty - tw;
+ ny = tx;
+ }
+ else if (sd->rot == 180)
+ {
+ nx = ww - tx - tw;
+ ny = wh - ty - th;
+ }
+ else if (sd->rot == 270)
+ {
+ nx = ty;
+ ny = ww - tx - th;
+ }
+ else
+ {
+ nx = tx;
+ ny = ty;
+ }
+
+ cx += nx;
+ cy += ny;
//
/* Part overlapping with conformant */
#endif
// TIZEN_ONLY(20150707): implemented elm_win_conformant_set/get for wayland
#ifdef HAVE_ELEMENTARY_WAYLAND
+ int tx = -1, ty = -1, tw = -1, th = -1;
+
wlwin = elm_win_wl_window_get(top);
if (wlwin)
- ecore_wl_window_keyboard_geometry_get(wlwin, &sx, &sy, &sw, &sh);
- Evas_Coord tmp = 0;
+ ecore_wl_window_keyboard_geometry_get(wlwin, &tx, &ty, &tw, &th);
Evas_Coord ww = 0, wh = 0;
elm_win_screen_size_get(top, NULL, NULL, &ww, &wh);
+
if (sd->rot == 90)
{
- SWAP(sx, sy, tmp);
- SWAP(sw, sh, tmp);
+ sx = wh - ty - th;
+ sy = tx;
+ sw = th;
+ sh = tw;
+ }
+ else if (sd->rot == 180)
+ {
+ sx = ww - tx - tw;
+ sy = wh - ty - th;
+ sw = tw;
+ sh = th;
}
- if (sd->rot == 180)
+ else if (sd->rot == 270)
{
- sy = wh - sh;
+ sx = ty;
+ sy = ww - tx - tw;
+ sw = th;
+ sh = tw;
}
- if (sd->rot == 270)
+ else
{
- sy = ww - sw;
- SWAP(sw, sh, tmp);
+ sx = tx;
+ sy = ty;
+ sw = tw;
+ sh = th;
}
#endif
//