summary refs log tree commit diff
path: root/screen.c
diff options
context:
space:
mode:
authoroga <oga>2009-12-10 17:16:51 +0000
committeroga <oga>2009-12-10 17:16:51 +0000
commit134e777cf095ae292730e1c9d3f7967099878024 (patch)
tree80a226385db61bf2bdf72e0c0b3490f0930303e9 /screen.c
parentee7df6a95f80bebc9ec2d8571c1ff8ff2f53cfd0 (diff)
downloadcwm-134e777cf095ae292730e1c9d3f7967099878024.tar.gz
cwm-134e777cf095ae292730e1c9d3f7967099878024.tar.xz
cwm-134e777cf095ae292730e1c9d3f7967099878024.zip
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 'screen.c')
-rw-r--r--screen.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/screen.c b/screen.c
index 6372362..6f73f2f 100644
--- a/screen.c
+++ b/screen.c
@@ -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;