]> Pileus Git - wmpus/blobdiff - wm-wmii.c
Add margin
[wmpus] / wm-wmii.c
index ace88143233e6ead82fee5ed1f674243a31ed622..304ce1c4686377447ad9e48b497f3fa623b0c014 100644 (file)
--- a/wm-wmii.c
+++ b/wm-wmii.c
@@ -6,6 +6,7 @@
 #include "wm.h"
 
 #define MODKEY alt
+#define MARGIN 5
 
 /* Loca types */
 struct win_wm {
@@ -28,13 +29,13 @@ typedef struct {
 } 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)
@@ -84,9 +85,10 @@ static void arrange(list_t *cols)
                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;
        }