]> Dogcows Code - chaz/openbox/blobdiff - openbox/resist.c
let you resize aspect ratio windows in north and south directions, and make them...
[chaz/openbox] / openbox / resist.c
index a3eee7b9102b7504985fa40bbca76095f7015cb5..b8f24893e8ebd26d8b7d543e47770dd2817b6024 100644 (file)
@@ -234,6 +234,8 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h,
                 case OB_DIRECTION_EAST:
                 case OB_DIRECTION_NORTHEAST:
                 case OB_DIRECTION_SOUTHEAST:
+                case OB_DIRECTION_NORTH:
+                case OB_DIRECTION_SOUTH:
                     dlt = l;
                     drb = r + *w - c->frame->area.width;
                     if (r < tl && drb >= tl &&
@@ -249,9 +251,6 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h,
                         dlt > tr - resist)
                         *w = r - tr, snapx = target;
                     break;
-                case OB_DIRECTION_NORTH:
-                case OB_DIRECTION_SOUTH:
-                    break;
                 }
             }
         }
@@ -263,6 +262,8 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h,
                 case OB_DIRECTION_SOUTH:
                 case OB_DIRECTION_SOUTHWEST:
                 case OB_DIRECTION_SOUTHEAST:
+                case OB_DIRECTION_EAST:
+                case OB_DIRECTION_WEST:
                     dlt = t;
                     drb = b + *h - c->frame->area.height;
                     if (b < tt && drb >= tt &&
@@ -278,9 +279,6 @@ void resist_size_windows(ObClient *c, gint resist, gint *w, gint *h,
                         dlt > tb - resist)
                         *h = b - tb, snapy = target;
                     break;
-                case OB_DIRECTION_EAST:
-                case OB_DIRECTION_WEST:
-                    break;
                 }
             }
         }
@@ -340,6 +338,8 @@ void resist_size_monitors(ObClient *c, gint resist, gint *w, gint *h,
         case OB_DIRECTION_EAST:
         case OB_DIRECTION_NORTHEAST:
         case OB_DIRECTION_SOUTHEAST:
+        case OB_DIRECTION_NORTH:
+        case OB_DIRECTION_SOUTH:
             dlt = l;
             drb = r + *w - c->frame->area.width;
             if (r <= ar && drb > ar && drb <= ar + resist)
@@ -357,9 +357,6 @@ void resist_size_monitors(ObClient *c, gint resist, gint *w, gint *h,
             else if (l >= pl && dlt < pl && dlt >= pl - resist)
                 *w = r - pl + 1;
             break;
-        case OB_DIRECTION_NORTH:
-        case OB_DIRECTION_SOUTH:
-            break;
         }
 
         /* vertical snapping */
@@ -367,6 +364,8 @@ void resist_size_monitors(ObClient *c, gint resist, gint *w, gint *h,
         case OB_DIRECTION_SOUTH:
         case OB_DIRECTION_SOUTHWEST:
         case OB_DIRECTION_SOUTHEAST:
+        case OB_DIRECTION_WEST:
+        case OB_DIRECTION_EAST:
             dlt = t;
             drb = b + *h - c->frame->area.height;
             if (b <= ab && drb > ab && drb <= ab + resist)
@@ -384,9 +383,6 @@ void resist_size_monitors(ObClient *c, gint resist, gint *w, gint *h,
             else if (t >= pt && dlt < pt && dlt >= pt - resist)
                 *h = b - pt + 1;
             break;
-        case OB_DIRECTION_WEST:
-        case OB_DIRECTION_EAST:
-            break;
         }
 
         g_free(area);
This page took 0.021727 seconds and 4 git commands to generate.