aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calmwm.h8
-rw-r--r--conf.c4
-rw-r--r--group.c36
-rw-r--r--kbfunc.c20
4 files changed, 34 insertions, 34 deletions
diff --git a/calmwm.h b/calmwm.h
index 83a3739..b1376d4 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -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.
*
- * $OpenBSD: calmwm.h,v 1.368 2019/03/04 19:28:17 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.369 2019/03/07 12:54:21 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -436,12 +436,10 @@ void client_urgency(struct client_ctx *);
void client_vtile(struct client_ctx *);
void client_wm_hints(struct client_ctx *);
-void group_alltoggle(struct screen_ctx *);
void group_assign(struct group_ctx *, struct client_ctx *);
int group_autogroup(struct client_ctx *);
void group_cycle(struct screen_ctx *, int);
void group_hide(struct group_ctx *);
-void group_hidetoggle(struct screen_ctx *, int);
int group_holds_only_hidden(struct group_ctx *);
int group_holds_only_sticky(struct group_ctx *);
void group_init(struct screen_ctx *, int, const char *);
@@ -450,6 +448,8 @@ void group_only(struct screen_ctx *, int);
void group_close(struct screen_ctx *, int);
int group_restore(struct client_ctx *);
void group_show(struct group_ctx *);
+void group_toggle(struct screen_ctx *, int);
+void group_toggle_all(struct screen_ctx *);
void group_toggle_membership(struct client_ctx *);
void group_update_names(struct screen_ctx *);
@@ -513,7 +513,7 @@ void kbfunc_group_toggle(void *, struct cargs *);
void kbfunc_group_only(void *, struct cargs *);
void kbfunc_group_close(void *, struct cargs *);
void kbfunc_group_cycle(void *, struct cargs *);
-void kbfunc_group_alltoggle(void *, struct cargs *);
+void kbfunc_group_toggle_all(void *, struct cargs *);
void kbfunc_menu_client(void *, struct cargs *);
void kbfunc_menu_cmd(void *, struct cargs *);
void kbfunc_menu_group(void *, struct cargs *);
diff --git a/conf.c b/conf.c
index 7812756..29b2053 100644
--- a/conf.c
+++ b/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.
*
- * $OpenBSD: conf.c,v 1.248 2019/03/04 19:28:18 okan Exp $
+ * $OpenBSD: conf.c,v 1.249 2019/03/07 12:54:21 okan Exp $
*/
#include <sys/types.h>
@@ -139,7 +139,7 @@ static const struct {
{ FUNC_SC(group-cycle, group_cycle, (CWM_CYCLE_FORWARD)) },
{ FUNC_SC(group-rcycle, group_cycle, (CWM_CYCLE_REVERSE)) },
- { FUNC_SC(group-toggle-all, group_alltoggle, 0) },
+ { FUNC_SC(group-toggle-all, group_toggle_all, 0) },
{ FUNC_SC(group-toggle-1, group_toggle, 1) },
{ FUNC_SC(group-toggle-2, group_toggle, 2) },
{ FUNC_SC(group-toggle-3, group_toggle, 3) },
diff --git a/group.c b/group.c
index 289c294..3419c8b 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.133 2019/03/01 14:32:01 okan Exp $
+ * $OpenBSD: group.c,v 1.134 2019/03/07 12:54:21 okan Exp $
*/
#include <sys/types.h>
@@ -204,7 +204,20 @@ group_holds_only_hidden(struct group_ctx *gc)
}
void
-group_hidetoggle(struct screen_ctx *sc, int idx)
+group_only(struct screen_ctx *sc, int idx)
+{
+ struct group_ctx *gc;
+
+ TAILQ_FOREACH(gc, &sc->groupq, entry) {
+ if (gc->num == idx)
+ group_show(gc);
+ else
+ group_hide(gc);
+ }
+}
+
+void
+group_toggle(struct screen_ctx *sc, int idx)
{
struct group_ctx *gc;
@@ -223,16 +236,17 @@ group_hidetoggle(struct screen_ctx *sc, int idx)
}
void
-group_only(struct screen_ctx *sc, int idx)
+group_toggle_all(struct screen_ctx *sc)
{
struct group_ctx *gc;
TAILQ_FOREACH(gc, &sc->groupq, entry) {
- if (gc->num == idx)
+ if (sc->hideall)
group_show(gc);
else
group_hide(gc);
}
+ sc->hideall = !sc->hideall;
}
void
@@ -301,20 +315,6 @@ group_prev(struct group_ctx *gc)
newgc : TAILQ_LAST(&sc->groupq, group_q));
}
-void
-group_alltoggle(struct screen_ctx *sc)
-{
- struct group_ctx *gc;
-
- TAILQ_FOREACH(gc, &sc->groupq, entry) {
- if (sc->hideall)
- group_show(gc);
- else
- group_hide(gc);
- }
- sc->hideall = !sc->hideall;
-}
-
int
group_restore(struct client_ctx *cc)
{
diff --git a/kbfunc.c b/kbfunc.c
index 2971f3b..9ae59f1 100644
--- a/kbfunc.c
+++ b/kbfunc.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.
*
- * $OpenBSD: kbfunc.c,v 1.163 2019/03/04 19:28:18 okan Exp $
+ * $OpenBSD: kbfunc.c,v 1.164 2019/03/07 12:54:21 okan Exp $
*/
#include <sys/types.h>
@@ -428,15 +428,21 @@ kbfunc_client_movetogroup(void *ctx, struct cargs *cargs)
}
void
+kbfunc_group_only(void *ctx, struct cargs *cargs)
+{
+ group_only(ctx, cargs->flag);
+}
+
+void
kbfunc_group_toggle(void *ctx, struct cargs *cargs)
{
- group_hidetoggle(ctx, cargs->flag);
+ group_toggle(ctx, cargs->flag);
}
void
-kbfunc_group_only(void *ctx, struct cargs *cargs)
+kbfunc_group_toggle_all(void *ctx, struct cargs *cargs)
{
- group_only(ctx, cargs->flag);
+ group_toggle_all(ctx);
}
void
@@ -452,12 +458,6 @@ kbfunc_group_cycle(void *ctx, struct cargs *cargs)
}
void
-kbfunc_group_alltoggle(void *ctx, struct cargs *cargs)
-{
- group_alltoggle(ctx);
-}
-
-void
kbfunc_menu_client(void *ctx, struct cargs *cargs)
{
struct screen_ctx *sc = ctx;