aboutsummaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authoroga2009-12-10 17:16:51 +0000
committeroga2009-12-10 17:16:51 +0000
commit14ac3391c5d071a67de062f4857280212e12afdb (patch)
tree7b3c4be635704fcb02ad2444a881fe93e02b595f /menu.c
parent4c4c8d61c662cfe45e4aa6b6662a1c00947225db (diff)
downloadcwm-14ac3391c5d071a67de062f4857280212e12afdb.tar.gz
finish unfucking the screen_ctx handling.
remove screen_current() it was utterly bogus when nscreens > 1. pass a fake client_ctx in the case where there's no client and the kbfunc or mousefunc doesn't need a real one, it just contains the current screen, modify these functions so that they pass down the screen context to their callees. make groups per screen, it's the only way it makes sense in this regard. ok okan@.
Diffstat (limited to '')
-rw-r--r--menu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/menu.c b/menu.c
index 2ac0d13..69f0588 100644
--- a/menu.c
+++ b/menu.c
@@ -69,11 +69,11 @@ menu_init(struct screen_ctx *sc)
}
struct menu *
-menu_filter(struct menu_q *menuq, char *prompt, char *initial, int dummy,
+menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt,
+ char *initial, int dummy,
void (*match)(struct menu_q *, struct menu_q *, char *),
void (*print)(struct menu *, int))
{
- struct screen_ctx *sc;
struct menu_ctx mc;
struct menu_q resultq;
struct menu *mi = NULL;
@@ -81,8 +81,6 @@ menu_filter(struct menu_q *menuq, char *prompt, char *initial, int dummy,
Window focuswin;
int evmask, focusrevert;
- sc = screen_current();
-
TAILQ_INIT(&resultq);
bzero(&mc, sizeof(mc));