+ Con *focused_con = con_descend_focused(floating_con);
+
+ /* ensure that resize will take place even if pixel increment is smaller than
+ * height increment or width increment.
+ * fixes #1011 */
+ if (strcmp(direction, "up") == 0 || strcmp(direction, "down") == 0 ||
+ strcmp(direction, "height") == 0) {
+ if (px < 0)
+ px = (-px < focused_con->height_increment) ? -focused_con->height_increment : px;
+ else
+ px = (px < focused_con->height_increment) ? focused_con->height_increment : px;
+ } else if (strcmp(direction, "left") == 0 || strcmp(direction, "right") == 0) {
+ if (px < 0)
+ px = (-px < focused_con->width_increment) ? -focused_con->width_increment : px;
+ else
+ px = (px < focused_con->width_increment) ? focused_con->width_increment : px;
+ }