summaryrefslogtreecommitdiff
path: root/app/cwm/conf.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-04-16 13:47:30 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-04-16 13:47:30 +0000
commitb0baed041741a83aca791cb3adc86f11f1ae891e (patch)
treefdf1a2fa23f5ac17aa2f9d899d8234ebbcb47828 /app/cwm/conf.c
parent80bd34676ed3f4dea285d60019cc92dc76ac76ca (diff)
merge kbfunc_{ptrmove,client_{move,resize}} into one function that takes a flag,
this code was almost identical... ok okan.
Diffstat (limited to 'app/cwm/conf.c')
-rw-r--r--app/cwm/conf.c71
1 files changed, 46 insertions, 25 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index 8ae68e961..119b14729 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: conf.c,v 1.27 2008/04/16 13:38:09 oga Exp $
+ * $Id: conf.c,v 1.28 2008/04/16 13:47:29 oga Exp $
*/
#include "headers.h"
@@ -238,14 +238,6 @@ struct {
{ "rcycle", kbfunc_client_rcycle, 0, 0 },
{ "label", kbfunc_client_label, KBFLAG_NEEDCLIENT, 0 },
{ "delete", kbfunc_client_delete, KBFLAG_NEEDCLIENT, 0 },
- { "ptrmoveup", kbfunc_ptrmove, 0, (void *)CWM_UP },
- { "ptrmovedown", kbfunc_ptrmove, 0, (void *)CWM_DOWN },
- { "ptrmoveleft", kbfunc_ptrmove, 0, (void *)CWM_LEFT },
- { "ptrmoveright", kbfunc_ptrmove, 0, (void *)CWM_RIGHT },
- { "bigptrmoveup", kbfunc_ptrmove, 0, (void *)(CWM_UP|CWM_BIGMOVE) },
- { "bigptrmovedown", kbfunc_ptrmove, 0, (void *)(CWM_DOWN|CWM_BIGMOVE) },
- { "bigptrmoveleft", kbfunc_ptrmove, 0, (void *)(CWM_LEFT|CWM_BIGMOVE) },
- { "bigptrmoveright", kbfunc_ptrmove, 0, (void *)(CWM_RIGHT|CWM_BIGMOVE) },
{ "group1", kbfunc_client_group, 0, (void *)1 },
{ "group2", kbfunc_client_group, 0, (void *)2 },
{ "group3", kbfunc_client_group, 0, (void *)3 },
@@ -266,22 +258,51 @@ struct {
{ "ssh", kbfunc_ssh, 0, 0 },
{ "terminal", kbfunc_term, 0, 0 },
{ "lock", kbfunc_lock, 0, 0 },
- { "moveup", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)CWM_UP },
- { "movedown", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)CWM_DOWN },
- { "moveright", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)CWM_RIGHT },
- { "moveleft", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)CWM_LEFT },
- { "bigmoveup", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)(CWM_UP|CWM_BIGMOVE) },
- { "bigmovedown", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)(CWM_DOWN|CWM_BIGMOVE) },
- { "bigmoveright", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)(CWM_RIGHT|CWM_BIGMOVE) },
- { "bigmoveleft", kbfunc_client_move, KBFLAG_NEEDCLIENT, (void *)(CWM_LEFT|CWM_BIGMOVE) },
- { "resizeup", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)(CWM_UP) },
- { "resizedown", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)CWM_DOWN },
- { "resizeright", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)CWM_RIGHT },
- { "resizeleft", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)CWM_LEFT },
- { "bigresizeup", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)(CWM_UP|CWM_BIGMOVE) },
- { "bigresizedown", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)(CWM_DOWN|CWM_BIGMOVE) },
- { "bigresizeright", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)(CWM_RIGHT|CWM_BIGMOVE) },
- { "bigresizeleft", kbfunc_client_resize, KBFLAG_NEEDCLIENT, (void *)(CWM_LEFT|CWM_BIGMOVE) },
+ { "moveup", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_UP|CWM_MOVE) },
+ { "movedown", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_DOWN|CWM_MOVE) },
+ { "moveright", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_RIGHT|CWM_MOVE) },
+ { "moveleft", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_LEFT|CWM_MOVE) },
+ { "bigmoveup", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_UP|CWM_MOVE|CWM_BIGMOVE) },
+ { "bigmovedown", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_DOWN|CWM_MOVE|CWM_BIGMOVE) },
+ { "bigmoveright", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_RIGHT|CWM_MOVE|CWM_BIGMOVE) },
+ { "bigmoveleft", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_LEFT|CWM_MOVE|CWM_BIGMOVE) },
+ { "resizeup", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_UP|CWM_RESIZE) },
+ { "resizedown", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_DOWN|CWM_RESIZE) },
+ { "resizeright", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_RIGHT|CWM_RESIZE) },
+ { "resizeleft", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_LEFT|CWM_RESIZE) },
+ { "bigresizeup", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_UP|CWM_RESIZE|CWM_BIGMOVE) },
+ { "bigresizedown", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_DOWN|CWM_RESIZE|CWM_BIGMOVE) },
+ { "bigresizeright", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_RIGHT|CWM_RESIZE|CWM_BIGMOVE) },
+ { "bigresizeleft", kbfunc_moveresize, KBFLAG_NEEDCLIENT,
+ (void *)(CWM_LEFT|CWM_RESIZE|CWM_BIGMOVE) },
+ { "ptrmoveup", kbfunc_moveresize, 0, (void *)(CWM_UP|CWM_PTRMOVE) },
+ { "ptrmovedown", kbfunc_moveresize, 0, (void *)(CWM_DOWN|CWM_PTRMOVE) },
+ { "ptrmoveleft", kbfunc_moveresize, 0, (void *)(CWM_LEFT|CWM_PTRMOVE) },
+ { "ptrmoveright", kbfunc_moveresize, 0,
+ (void *)(CWM_RIGHT|CWM_PTRMOVE) },
+ { "bigptrmoveup", kbfunc_moveresize, 0,
+ (void *)(CWM_UP|CWM_PTRMOVE|CWM_BIGMOVE) },
+ { "bigptrmovedown", kbfunc_moveresize, 0,
+ (void *)(CWM_DOWN|CWM_PTRMOVE|CWM_BIGMOVE) },
+ { "bigptrmoveleft", kbfunc_moveresize, 0,
+ (void *)(CWM_LEFT|CWM_PTRMOVE|CWM_BIGMOVE) },
+ { "bigptrmoveright", kbfunc_moveresize, 0,
+ (void *)(CWM_RIGHT|CWM_PTRMOVE|CWM_BIGMOVE) },
{ NULL, NULL, 0, 0},
};