From: Derek Foreman Date: Thu, 6 Dec 2018 15:54:10 +0000 (-0600) Subject: ecore_wl2: Fix anchor for xdg pop-ups X-Git-Tag: submit/tizen/20181218.080725~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=427a5ffc71a207b8871729e0ae467fa4676cc4ba;p=platform%2Fupstream%2Fefl.git ecore_wl2: Fix anchor for xdg pop-ups Anchors are in window geometry, so we should be using 0,0 instead of the parent x,y for the top left corner of the window. Signed-off-by: Derek Foreman Reviewed-by: Chris Michael Differential Revision: https://phab.enlightenment.org/D7436 --- diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 6e8bdfe..7d57ba1 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -392,7 +392,7 @@ static const struct xdg_popup_listener _xdg_popup_listener = static void _ecore_wl2_window_xdg_popup_create(Ecore_Wl2_Window *win) { - int gx, gy, gw, gh; + int gw, gh; struct xdg_positioner *pos; EINA_SAFETY_ON_NULL_RETURN(win->parent); @@ -401,8 +401,8 @@ _ecore_wl2_window_xdg_popup_create(Ecore_Wl2_Window *win) pos = zxdg_shell_v6_create_positioner(win->display->wl.zxdg_shell); if (!pos) return; - ecore_wl2_window_geometry_get(win, &gx, &gy, &gw, &gh); - xdg_positioner_set_anchor_rect(pos, gx, gy, 1, 1); + ecore_wl2_window_geometry_get(win, NULL, NULL, &gw, &gh); + xdg_positioner_set_anchor_rect(pos, 0, 0, 1, 1); xdg_positioner_set_size(pos, gw, gh); xdg_positioner_set_anchor(pos, XDG_POSITIONER_ANCHOR_TOP_LEFT); xdg_positioner_set_gravity(pos, ZXDG_POSITIONER_V6_ANCHOR_BOTTOM | diff --git a/src/lib/ecore_wl2/window_v6.x b/src/lib/ecore_wl2/window_v6.x index 8ec1496..ae9ccb4 100644 --- a/src/lib/ecore_wl2/window_v6.x +++ b/src/lib/ecore_wl2/window_v6.x @@ -109,15 +109,15 @@ static void _window_v6_popup_create(Ecore_Wl2_Window *win) { struct zxdg_positioner_v6 *pos; - int wx, wy, ww, wh; + int ww, wh; EINA_SAFETY_ON_NULL_RETURN(win->parent); pos = zxdg_shell_v6_create_positioner(win->display->wl.zxdg_shell); if (!pos) return; - ecore_wl2_window_geometry_get(win, &wx, &wy, &ww, &wh); + ecore_wl2_window_geometry_get(win, NULL, NULL, &ww, &wh); - zxdg_positioner_v6_set_anchor_rect(pos, wx, wy, 1, 1); + zxdg_positioner_v6_set_anchor_rect(pos, 0, 0, 1, 1); zxdg_positioner_v6_set_size(pos, ww, wh); zxdg_positioner_v6_set_anchor(pos, ZXDG_POSITIONER_V6_ANCHOR_TOP | ZXDG_POSITIONER_V6_ANCHOR_LEFT);