aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
Diffstat (limited to 'group.c')
-rw-r--r--group.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/group.c b/group.c
index abf3b7b..7f2363f 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.123 2016/10/04 15:18:20 okan Exp $
+ * $OpenBSD: group.c,v 1.124 2016/10/18 17:03:30 okan Exp $
*/
#include <sys/types.h>
@@ -265,7 +265,7 @@ group_cycle(struct screen_ctx *sc, int flags)
newgc = oldgc;
for (;;) {
- newgc = (flags & CWM_CLIENT_RCYCLE) ? group_prev(newgc) :
+ newgc = (flags & CWM_CYCLE_REVERSE) ? group_prev(newgc) :
group_next(newgc);
if (newgc == oldgc)
@@ -304,8 +304,8 @@ group_prev(struct group_ctx *gc)
struct screen_ctx *sc = gc->sc;
struct group_ctx *newgc;
- return(((newgc = TAILQ_PREV(gc, group_ctx_q, entry)) != NULL) ?
- newgc : TAILQ_LAST(&sc->groupq, group_ctx_q));
+ return(((newgc = TAILQ_PREV(gc, group_q, entry)) != NULL) ?
+ newgc : TAILQ_LAST(&sc->groupq, group_q));
}
void
@@ -351,21 +351,21 @@ int
group_autogroup(struct client_ctx *cc)
{
struct screen_ctx *sc = cc->sc;
- struct autogroupwin *aw;
+ struct autogroup *ag;
struct group_ctx *gc;
int num = -1, both_match = 0;
if (cc->ch.res_class == NULL || cc->ch.res_name == NULL)
return(0);
- TAILQ_FOREACH(aw, &Conf.autogroupq, entry) {
- if (strcmp(aw->class, cc->ch.res_class) == 0) {
- if ((aw->name != NULL) &&
- (strcmp(aw->name, cc->ch.res_name) == 0)) {
- num = aw->num;
+ TAILQ_FOREACH(ag, &Conf.autogroupq, entry) {
+ if (strcmp(ag->class, cc->ch.res_class) == 0) {
+ if ((ag->name != NULL) &&
+ (strcmp(ag->name, cc->ch.res_name) == 0)) {
+ num = ag->num;
both_match = 1;
- } else if (aw->name == NULL && !both_match)
- num = aw->num;
+ } else if (ag->name == NULL && !both_match)
+ num = ag->num;
}
}