mirror of
https://github.com/0intro/wmii
synced 2024-11-22 13:52:17 +03:00
Adjust column scaling.
This commit is contained in:
parent
40abae9c30
commit
9f87971cc1
@ -19,15 +19,14 @@ bar_init(WMScreen *s) {
|
||||
|
||||
wa.override_redirect = 1;
|
||||
wa.background_pixmap = ParentRelative;
|
||||
wa.event_mask =
|
||||
ExposureMask
|
||||
| ButtonPressMask
|
||||
| ButtonReleaseMask
|
||||
| FocusChangeMask;
|
||||
s->barwin = createwindow(&scr.root, s->brect, scr.depth, InputOutput, &wa,
|
||||
CWOverrideRedirect
|
||||
| CWBackPixmap
|
||||
| CWEventMask);
|
||||
wa.event_mask = ExposureMask
|
||||
| ButtonPressMask
|
||||
| ButtonReleaseMask
|
||||
| FocusChangeMask;
|
||||
s->barwin = createwindow(&scr.root, s->brect, scr.depth, InputOutput,
|
||||
&wa, CWOverrideRedirect
|
||||
| CWBackPixmap
|
||||
| CWEventMask);
|
||||
s->barwin->aux = s;
|
||||
xdnd_initwindow(s->barwin);
|
||||
sethandler(s->barwin, &handlers);
|
||||
@ -179,7 +178,7 @@ Bar*
|
||||
bar_find(Bar *bp, const char *name) {
|
||||
Bar *b;
|
||||
|
||||
for(b = bp; b; b = b->next)
|
||||
for(b=bp; b; b=b->next)
|
||||
if(!strcmp(b->name, name))
|
||||
break;
|
||||
return b;
|
||||
|
@ -248,9 +248,8 @@ column_scale(Area *a) {
|
||||
f->dy = 0;
|
||||
f->r.max.y = colh;
|
||||
}else {
|
||||
surplus -= uncolh;
|
||||
f->dy = Dy(f->r);
|
||||
f->r.max.y = uncolh;
|
||||
surplus -= Dy(f->r);
|
||||
f->dy = Dy(f->r) - uncolh;
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,7 +259,7 @@ column_scale(Area *a) {
|
||||
* surplus, or no more frames will accept it.
|
||||
*/
|
||||
osurplus = 0;
|
||||
while(surplus > 0 && surplus != osurplus) {
|
||||
while(surplus != osurplus) {
|
||||
osurplus = surplus;
|
||||
dy = 0;
|
||||
for(f=a->frame; f; f=f->anext)
|
||||
@ -274,8 +273,8 @@ column_scale(Area *a) {
|
||||
frame_resize(f, f->r);
|
||||
f->r.max.y = Dy(f->crect) + colh + 1;
|
||||
|
||||
surplus -= Dy(f->r) - i;
|
||||
f->dy = Dy(f->r);
|
||||
surplus -= f->dy - i;
|
||||
if(f->dy == i)
|
||||
f->dy = 0;
|
||||
}
|
||||
@ -291,7 +290,7 @@ column_scale(Area *a) {
|
||||
dy = Dy(f->r);
|
||||
f->r.max.y += surplus;
|
||||
frame_resize(f, f->r);
|
||||
f->r.max.y = Dy(f->crect) + labelh(def.font) + 1;
|
||||
f->r.max.y = Dy(f->crect) + colh + 1;
|
||||
surplus -= Dy(f->r) - dy;
|
||||
}
|
||||
|
||||
|
@ -91,8 +91,8 @@ char* debugtab[] = {
|
||||
};
|
||||
|
||||
static char* barpostab[] = {
|
||||
"bottom",
|
||||
"top",
|
||||
[BBottom] = "bottom",
|
||||
[BTop] = "top",
|
||||
};
|
||||
|
||||
/* Edit ,y/^[a-zA-Z].*\n.* {\n/d
|
||||
@ -644,9 +644,9 @@ msg_grow(View *v, IxpMsg *m) {
|
||||
|
||||
amount.x = Dy(f->titlebar);
|
||||
amount.y = Dy(f->titlebar);
|
||||
if(c->w.hints->inc.x > amount.x/2)
|
||||
if(amount.x < c->w.hints->inc.x)
|
||||
amount.x = c->w.hints->inc.x;
|
||||
if(c->w.hints->inc.y > amount.y/2)
|
||||
if(amount.y < c->w.hints->inc.y)
|
||||
amount.y = c->w.hints->inc.y;
|
||||
|
||||
if(!getamt(m, &amount))
|
||||
|
Loading…
Reference in New Issue
Block a user