summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/cwm/calmwm.h4
-rw-r--r--app/cwm/client.c15
-rw-r--r--app/cwm/conf.c6
-rw-r--r--app/cwm/kbfunc.c10
4 files changed, 22 insertions, 13 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index aab5a7220..49da89c21 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -4,7 +4,7 @@
* Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org>
* All rights reserved.
*
- * $Id: calmwm.h,v 1.5 2007/05/28 18:34:27 jasper Exp $
+ * $Id: calmwm.h,v 1.6 2007/06/05 19:03:20 jasper Exp $
*/
#ifndef _CALMWM_H_
@@ -320,7 +320,7 @@ u_long client_bg_pixel(struct client_ctx *);
Pixmap client_bg_pixmap(struct client_ctx *);
void client_map(struct client_ctx *cc);
void client_mtf(struct client_ctx *cc);
-struct client_ctx *client_cyclenext(struct client_ctx *cc, int reverse);
+struct client_ctx *client_cyclenext(int reverse);
void client_cycleinfo(struct client_ctx *cc);
void client_altrelease();
struct client_ctx *client_mrunext(struct client_ctx *cc);
diff --git a/app/cwm/client.c b/app/cwm/client.c
index 0f53d38a9..add109e80 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -4,7 +4,7 @@
* Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org>
* All rights reserved.
*
- * $Id: client.c,v 1.4 2007/05/29 22:38:44 jasper Exp $
+ * $Id: client.c,v 1.5 2007/06/05 19:03:20 jasper Exp $
*/
#include "headers.h"
@@ -604,14 +604,23 @@ match:
*/
struct client_ctx *
-client_cyclenext(struct client_ctx *cc, int reverse)
+client_cyclenext(int reverse)
{
- struct screen_ctx *sc = CCTOSC(cc);
+ struct screen_ctx *sc;
+ struct client_ctx *cc;
struct client_ctx *(*iter)(struct client_ctx *) =
reverse ? &client_mruprev : &client_mrunext;
/* TODO: maybe this should just be a CIRCLEQ. */
+ if (!(cc = _curcc)) {
+ if (TAILQ_EMPTY(&Clientq))
+ return(NULL);
+ cc = TAILQ_FIRST(&Clientq);
+ }
+
+ sc = CCTOSC(cc);
+
/* if altheld; then reset the iterator to the beginning */
if (!sc->altpersist || sc->cycle_client == NULL)
sc->cycle_client = TAILQ_FIRST(&sc->mruq);
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index 874965229..4c749668b 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -4,7 +4,7 @@
* Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org>
* All rights reserved.
*
- * $Id: conf.c,v 1.5 2007/05/28 21:11:39 jasper Exp $
+ * $Id: conf.c,v 1.6 2007/06/05 19:03:20 jasper Exp $
*/
#include "headers.h"
@@ -199,9 +199,9 @@ conf_setup(struct conf *c)
conf_bindkey(c, kbfunc_menu_search,
XK_slash, ControlMask, 0, 0);
conf_bindkey(c, kbfunc_client_cycle,
- XK_Tab, Mod1Mask, KBFLAG_NEEDCLIENT, 0);
+ XK_Tab, Mod1Mask, 0, 0);
conf_bindkey(c, kbfunc_client_rcycle,
- XK_Tab, Mod1Mask|ShiftMask, KBFLAG_NEEDCLIENT, 0);
+ XK_Tab, Mod1Mask|ShiftMask, 0, 0);
conf_bindkey(c, kbfunc_client_label, XK_l,
ControlMask|Mod1Mask, KBFLAG_NEEDCLIENT, 0);
conf_bindkey(c, kbfunc_client_delete, XK_x,
diff --git a/app/cwm/kbfunc.c b/app/cwm/kbfunc.c
index 1dbfe0b0d..dbd0dc707 100644
--- a/app/cwm/kbfunc.c
+++ b/app/cwm/kbfunc.c
@@ -4,7 +4,7 @@
* Copyright (c) 2004 Martin Murray <mmurray@monkey.org>
* All rights reserved.
*
- * $Id: kbfunc.c,v 1.3 2007/05/28 18:34:27 jasper Exp $
+ * $Id: kbfunc.c,v 1.4 2007/06/05 19:03:20 jasper Exp $
*/
#include "headers.h"
@@ -85,15 +85,15 @@ kbfunc_menu_search(struct client_ctx *scratch, void *arg)
}
void
-kbfunc_client_cycle(struct client_ctx *cc, void *arg)
+kbfunc_client_cycle(struct client_ctx *scratch, void *arg)
{
- client_cyclenext(cc, 0);
+ client_cyclenext(0);
}
void
-kbfunc_client_rcycle(struct client_ctx *cc, void *arg)
+kbfunc_client_rcycle(struct client_ctx *scratch, void *arg)
{
- client_cyclenext(cc, 1);
+ client_cyclenext(1);
}
void