Tiling2: Use resize_mode for detecting resize direction.
authorTom Hacohen <tom@stosb.com>
Thu, 16 Jan 2014 14:50:56 +0000 (14:50 +0000)
committerTom Hacohen <tom@stosb.com>
Fri, 21 Feb 2014 09:15:07 +0000 (09:15 +0000)
src/modules/tiling/e_mod_tiling.c

index aa3dd96..0f08f67 100644 (file)
@@ -703,13 +703,22 @@ static void _move_or_resize(E_Client *ec)
            {
               h_diff = ((double) ec->h) / extra->expected.h;
            }
-         if (extra->expected.x != ec->x)
+         switch (ec->resize_mode)
            {
-              w_dir = -1;
-           }
-         if (extra->expected.y != ec->y)
-           {
-              h_dir = -1;
+            case E_POINTER_RESIZE_L:
+            case E_POINTER_RESIZE_BL:
+               w_dir = -1;
+               break;
+            case E_POINTER_RESIZE_T:
+            case E_POINTER_RESIZE_TR:
+               h_dir = -1;
+               break;
+            case E_POINTER_RESIZE_TL:
+               w_dir = -1;
+               h_dir = -1;
+               break;
+            default:
+               break;
            }
          if ((w_diff != 1.0) || (h_diff != 1.0))
            {