changeset: 2351:c9afa5d8a147
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Oct 11 22:09:21 2008 -0400
files: cmd/wmii/bar.c cmd/wmii/main.c cmd/wmii/xext.c
description:
More xinerama stuff
diff -r e6c8be956668 -r c9afa5d8a147 cmd/wmii/bar.c
--- a/cmd/wmii/bar.c Sat Oct 11 20:31:06 2008 -0400
+++ b/cmd/wmii/bar.c Sat Oct 11 22:09:21 2008 -0400
@@ -44,7 +44,11 @@
s->brect = s->r;
s->brect.max.y = labelh(def.font);
- view_update(screen->sel);
+ /* Not guarangeed to exist on xinerama displays, for the
+ * moment;
+ */
+ if(screen->sel)
+ view_update(screen->sel);
}
void
diff -r e6c8be956668 -r c9afa5d8a147 cmd/wmii/main.c
--- a/cmd/wmii/main.c Sat Oct 11 20:31:06 2008 -0400
+++ b/cmd/wmii/main.c Sat Oct 11 22:09:21 2008 -0400
@@ -154,28 +154,31 @@
void
init_screens(void) {
Rectangle *rects;
+ static Image *ibuf, *ibuf32;
int i, n, m;
rects = xinerama_screens(&n);
m = max(n, num_screens);
-
screens = erealloc(screens, m * sizeof *screens);
for(i=num_screens; i < m; i++)
screens[i] = (WMScreen){ 0, };
+ num_screens = m;
- num_screens = m;
+ freeimage(ibuf);
+ freeimage(ibuf32);
+ ibuf = allocimage(Dx(scr.rect), Dy(scr.rect), scr.depth);
+ ibuf32 = nil; /* Probably shouldn't do this until it's needed. */
+ if(render_visual)
+ ibuf32 = allocimage(Dx(scr.rect), Dy(scr.rect), 32);
for(i=0; i < n; i++) {
screen = &screens[i];
- screen->r = scr.rect;
- def.snap = Dy(scr.rect) / 63;
- freeimage(screen->ibuf);
- freeimage(screen->ibuf32);
- screen->ibuf = allocimage(Dx(screen->r), Dy(screen->r), scr.depth);
- /* Probably shouldn't do this until it's needed. */
- if(render_visual)
- screen->ibuf32 = allocimage(Dx(screen->r), Dy(screen->r), 32);
+ print("rects[%d]: %R\n", i, rects[i]);
+ screen->r = rects[i];
+ def.snap = Dy(rects[i]) / 63;
+ screen->ibuf = ibuf;
+ screen->ibuf32 = ibuf32;
bar_init(screen);
}
diff -r e6c8be956668 -r c9afa5d8a147 cmd/wmii/xext.c
--- a/cmd/wmii/xext.c Sat Oct 11 20:31:06 2008 -0400
+++ b/cmd/wmii/xext.c Sat Oct 11 22:09:21 2008 -0400
@@ -158,6 +158,7 @@
rects[i].max.y = res[i].y_org + res[i].height;
}
+ print("have_xinerama: true; n: %d\n", n);
*np = n;
return rects;
}
Received on Tue Oct 14 2008 - 01:37:06 UTC
This archive was generated by hypermail 2.2.0 : Tue Oct 14 2008 - 01:48:04 UTC