#include "wm.h"
#define MODKEY alt
+#define MARGIN 5
/* Loca types */
struct win_wm {
} col_t;
/* Mouse drag data */
-drag_t move_mode;
-win_t *move_win;
-ptr_t move_prev;
+static drag_t move_mode;
+static win_t *move_win;
+static ptr_t move_prev;
/* Window management data */
-list_t *wm_cols;
-win_t *wm_root;
+static list_t *wm_cols;
+static win_t *wm_root;
/* Helper functions */
static void set_mode(drag_t drag, win_t *win, ptr_t ptr)
y = 0;
for (list_t *ly = col->rows; ly; ly = ly->next) {
win_t *win = ly->data;
- sys_move(win, x, y, col->width,
- win->h * ((float)my / ty));
- y += win->h;
+ sys_move(win, x+MARGIN, y+MARGIN,
+ col->width - MARGIN*2,
+ win->h * ((float)my / ty) - MARGIN*2);
+ y += win->h + MARGIN*2;
}
x += col->width;
}