ecore_wl2: Fix anchor for xdg pop-ups
authorDerek Foreman <derek.foreman.samsung@gmail.com>
Thu, 6 Dec 2018 15:54:10 +0000 (09:54 -0600)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 18 Dec 2018 04:23:55 +0000 (13:23 +0900)
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 <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7436

src/lib/ecore_wl2/ecore_wl2_window.c
src/lib/ecore_wl2/window_v6.x

index 6e8bdfe..7d57ba1 100644 (file)
@@ -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 |
index 8ec1496..ae9ccb4 100644 (file)
@@ -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);