kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=08ad426b8b81ded49f5966ab9e81f20ecf14ac9c

commit 08ad426b8b81ded49f5966ab9e81f20ecf14ac9c
Author: Kim Woelders <k...@woelders.dk>
Date:   Sun Jun 21 10:58:30 2015 +0200

    Fix ignoring ConfigureRequest from application.
    
    We would "correct" position/size even though we should ignore the
    operation.
---
 src/ewins.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/ewins.c b/src/ewins.c
index 5531c0d..caf8966 100644
--- a/src/ewins.c
+++ b/src/ewins.c
@@ -1326,7 +1326,8 @@ EwinEventConfigureRequest(EWin * ewin, XEvent * ev)
        winrel = 0;
        /* This is shady - some clients send root coords, some use the
         * ICCCM ones sent by us */
-       if (!EwinInhGetApp(ewin, move))
+       if ((ev->xconfigurerequest.value_mask & (CWX | CWY)) &&
+           !EwinInhGetApp(ewin, move))
          {
 #if 0                          /* FIXME - ??? */
             if (ev->xconfigurerequest.value_mask & CWX)
@@ -1341,13 +1342,21 @@ EwinEventConfigureRequest(EWin * ewin, XEvent * ev)
                y = ev->xconfigurerequest.y -
                   (Mode.wm.win_y + EoGetY(EoGetDesk(ewin)));
 #endif
+            /* Correct position taking gravity into account */
+            EwinGetPosition(ewin, x, y, 0, &x, &y);
          }
-       if (!EwinInhGetApp(ewin, size))
+       if ((ev->xconfigurerequest.value_mask & (CWWidth | CWHeight)) &&
+           !EwinInhGetApp(ewin, size))
          {
             if (ev->xconfigurerequest.value_mask & CWWidth)
                w = ev->xconfigurerequest.width;
             if (ev->xconfigurerequest.value_mask & CWHeight)
                h = ev->xconfigurerequest.height;
+            if ((ev->xconfigurerequest.value_mask & (CWX | CWY)) == 0)
+              {
+                 /* Resizing only */
+                 EwinKeepOnScreen(ewin, w, h, &x, &y);
+              }
          }
        if (ev->xconfigurerequest.value_mask & CWSibling)
           winrel = ev->xconfigurerequest.above;
@@ -1367,17 +1376,6 @@ EwinEventConfigureRequest(EWin * ewin, XEvent * ev)
               }
          }
 
-       if (ev->xconfigurerequest.value_mask & (CWX | CWY))
-         {
-            /* Correct position taking gravity into account */
-            EwinGetPosition(ewin, x, y, 0, &x, &y);
-         }
-       else if (ev->xconfigurerequest.value_mask & (CWWidth | CWHeight))
-         {
-            /* Resizing only */
-            EwinKeepOnScreen(ewin, w, h, &x, &y);
-         }
-
        EwinMoveResize(ewin, x, y, w, h, MRF_NOCHECK_ONSCREEN);
        ReZoom(ewin);
      }

-- 


Reply via email to