rio: fix topping a hidden window does not activate the foreground font color
This commit is contained in:
parent
559d2fc835
commit
30d54cc055
2 changed files with 6 additions and 6 deletions
|
@ -222,7 +222,7 @@ void wsetselect(Window*, uint, uint);
|
||||||
void wshow(Window*, uint);
|
void wshow(Window*, uint);
|
||||||
void wsnarf(Window*);
|
void wsnarf(Window*);
|
||||||
void wscrsleep(Window*, uint);
|
void wscrsleep(Window*, uint);
|
||||||
void wsetcols(Window*);
|
void wsetcols(Window*, int);
|
||||||
|
|
||||||
struct Dirtab
|
struct Dirtab
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,7 +105,7 @@ wresize(Window *w, Image *i, int move)
|
||||||
else{
|
else{
|
||||||
frclear(w, FALSE);
|
frclear(w, FALSE);
|
||||||
frinit(w, r, w->font, w->i, cols);
|
frinit(w, r, w->font, w->i, cols);
|
||||||
wsetcols(w);
|
wsetcols(w, 1);
|
||||||
w->maxtab = maxtab*stringwidth(w->font, "0");
|
w->maxtab = maxtab*stringwidth(w->font, "0");
|
||||||
r = insetrect(w->i->r, Selborder);
|
r = insetrect(w->i->r, Selborder);
|
||||||
draw(w->i, r, cols[BACK], nil, w->entire.min);
|
draw(w->i, r, cols[BACK], nil, w->entire.min);
|
||||||
|
@ -710,15 +710,15 @@ wkeyctl(Window *w, Rune r)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
wsetcols(Window *w)
|
wsetcols(Window *w, int topped)
|
||||||
{
|
{
|
||||||
if(w->holding)
|
if(w->holding)
|
||||||
if(w == input)
|
if(topped)
|
||||||
w->cols[TEXT] = w->cols[HTEXT] = holdcol;
|
w->cols[TEXT] = w->cols[HTEXT] = holdcol;
|
||||||
else
|
else
|
||||||
w->cols[TEXT] = w->cols[HTEXT] = lightholdcol;
|
w->cols[TEXT] = w->cols[HTEXT] = lightholdcol;
|
||||||
else
|
else
|
||||||
if(w == input)
|
if(topped)
|
||||||
w->cols[TEXT] = w->cols[HTEXT] = cols[TEXT];
|
w->cols[TEXT] = w->cols[HTEXT] = cols[TEXT];
|
||||||
else
|
else
|
||||||
w->cols[TEXT] = w->cols[HTEXT] = paletextcol;
|
w->cols[TEXT] = w->cols[HTEXT] = paletextcol;
|
||||||
|
@ -727,7 +727,7 @@ wsetcols(Window *w)
|
||||||
void
|
void
|
||||||
wrepaint(Window *w)
|
wrepaint(Window *w)
|
||||||
{
|
{
|
||||||
wsetcols(w);
|
wsetcols(w, w == input);
|
||||||
if(!w->mouseopen)
|
if(!w->mouseopen)
|
||||||
frredraw(w);
|
frredraw(w);
|
||||||
if(w == input)
|
if(w == input)
|
||||||
|
|
Loading…
Reference in a new issue