changeset: 2372:9e090634b6ca
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Oct 15 21:34:15 2008 -0400
files: cmd/wmii/view.c
description:
More Xinerama work
diff -r 4d00266a9f21 -r 9e090634b6ca cmd/wmii/view.c
--- a/cmd/wmii/view.c Wed Oct 15 21:22:49 2008 -0400
+++ b/cmd/wmii/view.c Wed Oct 15 21:34:15 2008 -0400
@@ -480,7 +480,7 @@
uint minwidth;
Area *a;
float scale;
- int dx;
+ int dx, s;
minwidth = Dx(v->screenr)/NCOL; /* XXX: Multihead. */
@@ -495,27 +495,31 @@
}
scale = (float)w / dx;
- xoff = v->screenr.min.x; /* XXX: Multihead. */
- for(a=v->firstarea; a; a=a->next) {
- a->r.max.x = xoff + Dx(a->r) * scale;
- a->r.min.x = xoff;
- if(!a->next)
- a->r.max.x = v->screenr.min.x + w; /* XXX: Multihead. */
- xoff = a->r.max.x;
+ for(s=0; s < nscreens; s++) {
+ xoff = v->r[s].min.x;
+ for(a=v->areas[s]; a; a=a->next) {
+ a->r.max.x = xoff + Dx(a->r) * scale;
+ a->r.min.x = xoff;
+ if(!a->next)
+ a->r.max.x = v->r[s].min.x + w; /* XXX: Multihead. */
+ xoff = a->r.max.x;
+ }
}
if(numcol * minwidth > w)
return;
- xoff = v->screenr.min.x; /* XXX: Multihead. */
- for(a=v->firstarea; a; a=a->next) {
- a->r.min.x = xoff;
+ for(s=0; s < nscreens; s++) {
+ xoff = v->r[s].min.x;
+ for(a=v->areas[s]; a; a=a->next) {
+ a->r.min.x = xoff;
- if(Dx(a->r) < minwidth)
- a->r.max.x = xoff + minwidth;
- if(!a->next)
- a->r.max.x = v->screenr.min.x + w; /* XXX: Multihead. */
- xoff = a->r.max.x;
+ if(Dx(a->r) < minwidth)
+ a->r.max.x = xoff + minwidth;
+ if(!a->next)
+ a->r.max.x = v->r[s].min.x + w;
+ xoff = a->r.max.x;
+ }
}
}
@@ -523,17 +527,19 @@
void
view_arrange(View *v) {
Area *a;
+ int s;
if(!v->firstarea)
return;
view_update_rect(v);
view_scale(v, Dx(v->screenr));
- for(a=v->firstarea; a; a=a->next) {
+ foreach_area(v, s, a) {
+ if(a->floating)
+ continue;
/* This is wrong... */
- a->r.min.y = v->screenr.min.y;
- a->r.max.y = v->screenr.max.y;
-/* print("a->r: %R %R %R\n", a->r, v->r, screen->r); */
+ a->r.min.y = v->r[s].min.y;
+ a->r.max.y = v->r[s].max.y;
column_arrange(a, false);
}
if(v == screen->sel)
Received on Thu Oct 16 2008 - 01:34:16 UTC
This archive was generated by hypermail 2.2.0 : Thu Oct 16 2008 - 01:36:04 UTC