1323 y = m->sh - h - 2 * c->border; |
1322 y = m->sh - h - 2 * c->border; |
1324 if(x + w + 2 * c->border < m->sx) |
1323 if(x + w + 2 * c->border < m->sx) |
1325 x = m->sx; |
1324 x = m->sx; |
1326 if(y + h + 2 * c->border < m->sy) |
1325 if(y + h + 2 * c->border < m->sy) |
1327 y = m->sy; |
1326 y = m->sy; |
|
1327 fprintf(stderr, "resize %d %d %d %d (%d %d %d %d)\n", x, y , w, h, m->sx, m->sy, m->sw, m->sh); |
1328 if(c->x != x || c->y != y || c->w != w || c->h != h) { |
1328 if(c->x != x || c->y != y || c->w != w || c->h != h) { |
1329 c->x = wc.x = x; |
1329 c->x = wc.x = x; |
1330 c->y = wc.y = y; |
1330 c->y = wc.y = y; |
1331 c->w = wc.width = w; |
1331 c->w = wc.width = w; |
1332 c->h = wc.height = h; |
1332 c->h = wc.height = h; |
1603 for(i = 0; i < mcount; i++) { |
1603 for(i = 0; i < mcount; i++) { |
1604 /* init geometry */ |
1604 /* init geometry */ |
1605 m = &monitors[i]; |
1605 m = &monitors[i]; |
1606 m->id = i; |
1606 m->id = i; |
1607 |
1607 |
1608 if (mcount != 1 && isxinerama) { |
1608 if(mcount != 1 && isxinerama) { |
1609 m->sx = info[i].x_org; |
1609 m->sx = info[i].x_org; |
1610 m->sy = info[i].y_org; |
1610 m->sy = info[i].y_org; |
1611 m->sw = info[i].width; |
1611 m->sw = info[i].width; |
1612 m->sh = info[i].height; |
1612 m->sh = info[i].height; |
1613 fprintf(stderr, "monitor[%d]: %d,%d,%d,%d\n", i, m->sx, m->sy, m->sw, m->sh); |
1613 fprintf(stderr, "monitor[%d]: %d,%d,%d,%d\n", i, m->sx, m->sy, m->sw, m->sh); |
1725 tile(Monitor *m) { |
1725 tile(Monitor *m) { |
1726 unsigned int i, n, nx, ny, nw, nh, mw, th; |
1726 unsigned int i, n, nx, ny, nw, nh, mw, th; |
1727 Client *c, *mc; |
1727 Client *c, *mc; |
1728 |
1728 |
1729 domwfact = dozoom = True; |
1729 domwfact = dozoom = True; |
1730 |
1730 nx = m->wax; |
1731 nx = ny = nw = 0; /* gcc stupidity requires this */ |
1731 ny = m->way; |
1732 |
1732 nw = 0; |
1733 for(n = 0, c = nexttiled(clients, m); c; c = nexttiled(c->next, m)) |
1733 for(n = 0, c = nexttiled(clients, m); c; c = nexttiled(c->next, m)) |
1734 n++; |
1734 n++; |
1735 |
1735 |
1736 /* window geoms */ |
1736 /* window geoms */ |
1737 mw = (n == 1) ? m->waw : m->mwfact * m->waw; |
1737 mw = (n == 1) ? m->waw : m->mwfact * m->waw; |
1755 if(i + 1 == n) /* remainder */ |
1755 if(i + 1 == n) /* remainder */ |
1756 nh = (m->way + m->wah) - ny - 2 * c->border; |
1756 nh = (m->way + m->wah) - ny - 2 * c->border; |
1757 else |
1757 else |
1758 nh = th - 2 * c->border; |
1758 nh = th - 2 * c->border; |
1759 } |
1759 } |
|
1760 fprintf(stderr, "tile %d %d %d %d\n", nx, ny, nw, nh); |
1760 resize(c, nx, ny, nw, nh, RESIZEHINTS); |
1761 resize(c, nx, ny, nw, nh, RESIZEHINTS); |
1761 if((RESIZEHINTS) && ((c->h < bh) || (c->h > nh) || (c->w < bh) || (c->w > nw))) |
1762 if((RESIZEHINTS) && ((c->h < bh) || (c->h > nh) || (c->w < bh) || (c->w > nw))) |
1762 /* client doesn't accept size constraints */ |
1763 /* client doesn't accept size constraints */ |
1763 resize(c, nx, ny, nw, nh, False); |
1764 resize(c, nx, ny, nw, nh, False); |
1764 if(n > 1 && th != m->wah) |
1765 if(n > 1 && th != m->wah) |
1765 ny = c->y + c->h + 2 * c->border; |
1766 ny = c->y + c->h + 2 * c->border; |
1766 |
|
1767 i++; |
1767 i++; |
1768 } |
1768 } |
1769 } |
1769 } |
|
1770 |
1770 void |
1771 void |
1771 togglebar(const char *arg) { |
1772 togglebar(const char *arg) { |
1772 if(bpos == BarOff) |
1773 if(bpos == BarOff) |
1773 bpos = (BARPOS == BarOff) ? BarTop : BARPOS; |
1774 bpos = (BARPOS == BarOff) ? BarTop : BARPOS; |
1774 else |
1775 else |