$OpenBSD: patch-src_commands_c,v 1.7 2013/05/17 10:21:42 dcoppa Exp $

commit a93e1e5c59573887f9cc49c1c40bf28b92e567b2
Author: oblique <psyberbits@gmail.com>
Date:   Mon Apr 15 21:30:22 2013 +0300

Ensure that resize will take place even if pixel is smaller than
size increments.

--- src/commands.c.orig	Mon Mar 18 22:43:36 2013
+++ src/commands.c	Fri May 17 11:46:30 2013
@@ -174,7 +174,7 @@ void cmd_MIGRATION_start_nagbar(void) {
     /* child */
     if (migration_pid == 0) {
         char *pageraction;
-        sasprintf(&pageraction, "i3-sensible-terminal -e i3-sensible-pager \"%s\"", errorfilename);
+        sasprintf(&pageraction, "${X11BASE}/bin/xterm -e /usr/bin/less \"%s\"", errorfilename);
         char *argv[] = {
             NULL, /* will be replaced by the executable path */
             "-t",
@@ -569,6 +569,23 @@ void cmd_move_con_to_workspace_number(I3_CMD, char *wh
 static void cmd_resize_floating(I3_CMD, char *way, char *direction, Con *floating_con, int px) {
     LOG("floating resize\n");
     Rect old_rect = floating_con->rect;
+    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;
+    }
 
     if (strcmp(direction, "up") == 0) {
         floating_con->rect.height += px;
