diff options
author | aiju <devnull@localhost> | 2014-07-31 11:36:24 +0200 |
---|---|---|
committer | aiju <devnull@localhost> | 2014-07-31 11:36:24 +0200 |
commit | 709e78b9f9a76658cc6c704176ebf8f5821ee9d2 (patch) | |
tree | 89b0e66fd11d691dbef6c5fed98f3b62d157bd5a /sys/src/cmd/spred/spr.c | |
parent | 98d518cc8c1ff7d1440ebffb9f546d3e0e149d60 (diff) |
spred: scrolling and other bugfixes
Diffstat (limited to 'sys/src/cmd/spred/spr.c')
-rw-r--r-- | sys/src/cmd/spred/spr.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/src/cmd/spred/spr.c b/sys/src/cmd/spred/spr.c index f61b59781..23b144888 100644 --- a/sys/src/cmd/spred/spr.c +++ b/sys/src/cmd/spred/spr.c @@ -258,15 +258,14 @@ sprclick(Win *w, Mousectl *mc) continue; if(s->data[q.y * s->w + q.x] != p->sel){ s->data[q.y * s->w + q.x] = p->sel; - s->change = 1; - quitok = 0; + change(s); sprdraw(w); } }while(readmouse(mc) >= 0 && (mc->buttons & 1) != 0); } void -sprsize(Spr *s, int n, int m) +sprsize(Spr *s, int n, int m, int ch) { u32int *v; int i, j, w, h; @@ -282,8 +281,8 @@ sprsize(Spr *s, int n, int m) s->data[j * n + i] = v[j * w + i]; s->w = n; s->h = m; - s->change = 1; - quitok = 0; + if(ch) + change(s); filredraw(s); } @@ -322,8 +321,8 @@ sprmenu(Win *w, Mousectl *mc) s->pal = (Pal *) wp->f; free(s->palfile); s->palfile = palfile(s->name, s->pal->name); - s->change = 1; - quitok = 0; + cmdprint("palette set to %q\n", s->palfile); + change(s); filredraw(s); } break; |