I'm not sure what you mean with "old patch" but I use this since very old dwm
releases (though with very little changes from time to time):

static void
moveresize(const Arg *arg)
{
   XEvent ev;

   if( ! (selmon->sel && arg && selmon->sel->isfloating && arg->v)  )
      return;

   resize(selmon->sel, selmon->sel->x + ((int *)arg->v)[0],
               selmon->sel->y + ((int *)arg->v)[1],
               selmon->sel->w + ((int *)arg->v)[2],
               selmon->sel->h + ((int *)arg->v)[3],
               True);

   while( XCheckMaskEvent(dpy, EnterWindowMask, &ev) );

}

You can avoid the "fields" postfix if you remember they are in a precise order.
In this case: x, y, w, h. In my config.h the key bindings are as follow:

{ MODKEY,                       XK_Down,   moveresize,     {.v = (int []){ 0, 
25, 0, 0 }}},
{ MODKEY,                       XK_Up,     moveresize,     {.v = (int []){ 0, 
-25, 0, 0 }}},
{ MODKEY,                       XK_Right,  moveresize,     {.v = (int []){ 25, 
0, 0, 0 }}},
{ MODKEY,                       XK_Left,   moveresize,     {.v = (int []){ -24, 
0, 0, 0 }}},
{ MODKEY|ShiftMask,             XK_Down,   moveresize,     {.v = (int []){ 0, 
0, 0, 25 }}},
{ MODKEY|ShiftMask,             XK_Up,     moveresize,     {.v = (int []){ 0, 
0, 0, -25 }}},
{ MODKEY|ShiftMask,             XK_Right,  moveresize,     {.v = (int []){ 0, 
0, 25, 0 }}},
{ MODKEY|ShiftMask,             XK_Left,   moveresize,     {.v = (int []){ 0, 
0, -25, 0 }}},

Hope this helps.

-- 
JID: smoppy AT gmail.com
WWW: http://cma.teroristi.org

Reply via email to