diff options
author | oga | 2009-12-10 17:16:51 +0000 |
---|---|---|
committer | oga | 2009-12-10 17:16:51 +0000 |
commit | 14ac3391c5d071a67de062f4857280212e12afdb (patch) | |
tree | 7b3c4be635704fcb02ad2444a881fe93e02b595f /calmwm.c | |
parent | 4c4c8d61c662cfe45e4aa6b6662a1c00947225db (diff) | |
download | cwm-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-- | calmwm.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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. * - * $Id: calmwm.c,v 1.46 2009/12/08 16:52:17 okan Exp $ + * $Id: calmwm.c,v 1.47 2009/12/10 17:16:51 oga Exp $ */ #include "headers.h" @@ -30,8 +30,6 @@ Cursor Cursor_default; Cursor Cursor_question; struct screen_ctx_q Screenq = TAILQ_HEAD_INITIALIZER(Screenq); -struct screen_ctx *Curscreen; - struct client_ctx_q Clientq = TAILQ_HEAD_INITIALIZER(Clientq); int HasXinerama, HasRandr, Randr_ev; @@ -73,8 +71,6 @@ main(int argc, char **argv) Starting = 1; dpy_init(display_name); - group_init(); - bzero(&Conf, sizeof(Conf)); conf_setup(&Conf, conf_file); xu_getatoms(); @@ -149,8 +145,6 @@ x_setupscreen(struct screen_ctx *sc, u_int which) int fake; u_int ndesks = CALMWM_NGROUPS, nwins, i; - Curscreen = sc; - sc->which = which; sc->rootwin = RootWindow(X_Dpy, sc->which); sc->xmax = DisplayWidth(X_Dpy, sc->which); @@ -158,6 +152,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which) conf_color(&Conf, sc); + group_init(sc); font_init(sc); conf_font(&Conf, sc); @@ -187,7 +182,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which) } XFree(wins); - screen_updatestackingorder(); + screen_updatestackingorder(sc); rootattr.event_mask = ChildMask|PropertyChangeMask|EnterWindowMask| LeaveWindowMask|ColormapChangeMask|ButtonMask; |