raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=ccbbe5a459921e1b53aaa87dd132501546ecaa83

commit ccbbe5a459921e1b53aaa87dd132501546ecaa83
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Tue Apr 7 10:40:12 2020 +0100

    wayland xdg positioner - fix to handle resize constraints
    
    this fixes T8295
    
    @fix
---
 src/modules/wl_desktop_shell/xdg.c  | 5 ++---
 src/modules/wl_desktop_shell/xdg6.c | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/modules/wl_desktop_shell/xdg.c 
b/src/modules/wl_desktop_shell/xdg.c
index 4ecff03c9..81e1fb6e6 100644
--- a/src/modules/wl_desktop_shell/xdg.c
+++ b/src/modules/wl_desktop_shell/xdg.c
@@ -898,13 +898,12 @@ _apply_positioner(E_Client *ec, Positioner *p)
    if (_apply_positioner_slide(ec, p, zx, zy, zw, zh)) return;
    _apply_positioner_slide(ec, p, ec->zone->x, ec->zone->y, ec->zone->w, 
ec->zone->h);
 
-#if 0
-//resize_x/y is stupid so we're not going to do it
    if (!CONSTRAINED(ec, ec->x, ec->y)) return;
 
    if ((p->constrain & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X) &&
        (!E_CONTAINS(zx, zy, zw, zh, ec->x, zy, ec->w, 1)))
      {
+        if (ec->x < zx) ec->x = zx;
         ec->w = zx + zw - ec->x;
         e_client_resize_limit(ec, &ec->w, &ec->h);
         ec->changes.size = 1;
@@ -913,11 +912,11 @@ _apply_positioner(E_Client *ec, Positioner *p)
    if ((p->constrain & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y) &&
        (!E_CONTAINS(zx, zy, zw, zh, zx, ec->y, 1, ec->h)))
      {
+        if (ec->y < zy) ec->y = zy;
         ec->h = zy + zh - ec->y;
         e_client_resize_limit(ec, &ec->w, &ec->h);
         ec->changes.size = 1;
      }
-#endif
 }
 
 static void
diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index 9276791d3..ce236023e 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -811,6 +811,7 @@ _apply_positioner(E_Client *ec, Positioner *p)
 {
    int x, y;
    int zx, zy, zw, zh;
+
    /* apply base geometry:
     * coords are relative to parent
     */
@@ -863,13 +864,12 @@ _apply_positioner(E_Client *ec, Positioner *p)
    if (_apply_positioner_slide(ec, p, zx, zy, zw, zh)) return;
    _apply_positioner_slide(ec, p, ec->zone->x, ec->zone->y, ec->zone->w, 
ec->zone->h);
 
-#if 0
-//resize_x/y is stupid so we're not going to do it
    if (!CONSTRAINED(ec, ec->x, ec->y)) return;
 
    if ((p->constrain & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X) &&
        (!E_CONTAINS(zx, zy, zw, zh, ec->x, zy, ec->w, 1)))
      {
+        if (ec->x < zx) ec->x = zx;
         ec->w = zx + zw - ec->x;
         e_client_resize_limit(ec, &ec->w, &ec->h);
         ec->changes.size = 1;
@@ -878,11 +878,11 @@ _apply_positioner(E_Client *ec, Positioner *p)
    if ((p->constrain & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y) &&
        (!E_CONTAINS(zx, zy, zw, zh, zx, ec->y, 1, ec->h)))
      {
+        if (ec->y < zy) ec->y = zy;
         ec->h = zy + zh - ec->y;
         e_client_resize_limit(ec, &ec->w, &ec->h);
         ec->changes.size = 1;
      }
-#endif
 }
 
 static void

-- 


Reply via email to