aboutsummaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authoroga2009-12-10 17:16:51 +0000
committeroga2009-12-10 17:16:51 +0000
commit14ac3391c5d071a67de062f4857280212e12afdb (patch)
tree7b3c4be635704fcb02ad2444a881fe93e02b595f /screen.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--screen.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/screen.c b/screen.c
index 3516b74..f53a31b 100644
--- a/screen.c
+++ b/screen.c
@@ -15,14 +15,12 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: screen.c,v 1.19 2009/11/28 17:52:12 tobias Exp $
+ * $Id: screen.c,v 1.20 2009/12/10 17:16:51 oga Exp $
*/
#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;