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@.
This commit is contained in:
oga
2009-12-10 17:16:51 +00:00
parent ee7df6a95f
commit 134e777cf0
9 changed files with 163 additions and 164 deletions

View File

@@ -21,8 +21,6 @@
#include "headers.h"
#include "calmwm.h"
extern struct screen_ctx *Curscreen;
struct screen_ctx *
screen_fromroot(Window rootwin)
{
@@ -36,22 +34,13 @@ screen_fromroot(Window rootwin)
return (TAILQ_FIRST(&Screenq));
}
struct screen_ctx *
screen_current(void)
{
return (Curscreen);
}
void
screen_updatestackingorder(void)
screen_updatestackingorder(struct screen_ctx *sc)
{
Window *wins, w0, w1;
struct screen_ctx *sc;
struct client_ctx *cc;
u_int nwins, i, s;
sc = screen_current();
if (!XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins))
return;