ref: b0cd0020dfe482780d24faee59beb5c1bf8635d7
parent: 4755fce1dc286432a952fa5acb54c7fa880fe1b2
author: cinap_lenrek <[email protected]>
date: Thu Jul 18 16:56:19 EDT 2013
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.
--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -330,7 +330,6 @@
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 @@
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 @@
exits(0);
}
plinitentry(cmd, EXPAND, 0, "", docmd);
- if(defdisplay) pldraw(cmd, screen);
+ pldraw(root, screen);
}
void hiturl(int buttons, char *url, int map){