check gravity variable for gravities when applying xdg6 positioners

fixes positioning

--(typo--)
This commit is contained in:
Mike Blumenkrantz 2016-11-29 11:45:09 -05:00
parent 632e4097b5
commit f5788293b5
1 changed files with 2 additions and 2 deletions

View File

@ -659,7 +659,7 @@ _apply_positioner_x(int x, Positioner *p, Eina_Bool invert)
if (grav & ZXDG_POSITIONER_V6_GRAVITY_LEFT)
x -= p->size.w;
/* center on anchor */
else if (!(an & ZXDG_POSITIONER_V6_GRAVITY_RIGHT))
else if (!(grav & ZXDG_POSITIONER_V6_GRAVITY_RIGHT))
x -= p->size.w / 2;
return x;
}
@ -701,7 +701,7 @@ _apply_positioner_y(int y, Positioner *p, Eina_Bool invert)
if (grav & ZXDG_POSITIONER_V6_GRAVITY_TOP)
y -= p->size.h;
/* center on anchor */
else if (!(an & ZXDG_POSITIONER_V6_GRAVITY_BOTTOM))
else if (!(grav & ZXDG_POSITIONER_V6_GRAVITY_BOTTOM))
y -= p->size.h / 2;
return y;
}