summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-07-18 20:56:19 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-07-18 20:56:19 +0200
commitb0cd0020dfe482780d24faee59beb5c1bf8635d7 (patch)
treed040bf739254ef74e67194cfd39ee4e55674e51a
parent4755fce1dc286432a952fa5acb54c7fa880fe1b2 (diff)
mothra: use pldraw() to put cmd box on screen for alt display
the cmd box is not part of the alt display hirarchy. for command typing to show the box in alt display, we call pldraw() on it in eresized() to initialize its cmd->b image so it knows where to draw itself on typing.
-rw-r--r--sys/src/cmd/mothra/mothra.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c
index e2788e6ba..c6457f547 100644
--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -330,7 +330,6 @@ void main(int argc, char *argv[]){
bullet=allocimage(display, Rect(0,0,25, 8), screen->chan, 0, DWhite);
fillellipse(bullet, Pt(4,4), 3, 3, display->black, ZP);
mkpanels();
-
unlockdisplay(display);
eresized(0);
drawlock(1);
@@ -467,7 +466,7 @@ void eresized(int new){
r=screen->r;
plpack(root, r);
plpack(alt, r);
- draw(screen, r, display->white, 0, ZP);
+ pldraw(cmd, screen); /* put cmd box on screen for alt display */
pldraw(root, screen);
flushimage(display, 1);
drawlock(0);
@@ -696,7 +695,7 @@ void docmd(Panel *p, char *s){
exits(0);
}
plinitentry(cmd, EXPAND, 0, "", docmd);
- if(defdisplay) pldraw(cmd, screen);
+ pldraw(root, screen);
}
void hiturl(int buttons, char *url, int map){