summaryrefslogtreecommitdiff
path: root/appl
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2009-04-03 13:18:03 +0000
committerCharles.Forsyth <devnull@localhost>2009-04-03 13:18:03 +0000
commit6257024afa02f4a61f05ebd05f9b067974b60f4a (patch)
treeae50c126a4be96a8a88e491589f6481ad2b6cfb8 /appl
parent96d99b9d5842a29c2374d9cdf300985d2cb1ca20 (diff)
20090403-1415
Diffstat (limited to 'appl')
-rw-r--r--appl/wm/brutus.b36
1 files changed, 27 insertions, 9 deletions
diff --git a/appl/wm/brutus.b b/appl/wm/brutus.b
index b18d6a9d..0d177bf8 100644
--- a/appl/wm/brutus.b
+++ b/appl/wm/brutus.b
@@ -1718,7 +1718,7 @@ widget(parent: ref Tk->Toplevel, ctxt: ref Draw->Context, cfg: array of string):
tkcmds(top: ref Tk->Toplevel, a: array of string)
{
for(i := 0; i < len a; i++)
- v := tk->cmd(top, a[i]);
+ v := tkcmd(top, a[i]);
}
confirm(ctxt: ref Draw->Context, parent: ref Tk->Toplevel, message: string, write: int): string
@@ -1735,8 +1735,17 @@ confirm1(ctxt: ref Draw->Context, parent: ref Tk->Toplevel, message: string, wri
if(write == 0)
tkcmd(t, "destroy .f.exitclean");
tkcmd(t, UPDATE);
+ tkclient->onscreen(t, "onscreen");
cmd := chan of string;
tk->namechan(t, cmd, "cmd");
+ tkclient->onscreen(t, "exact");
+ tkclient->startinput(t, "ptr"::nil);
+ for(;;) alt {
+ s := <-t.ctxt.ptr =>
+ tk->pointer(t, *s);
+ c := <-cmd =>
+ return c;
+ }
return <-cmd;
}
@@ -1843,17 +1852,26 @@ tageditor(ctxt: ref Draw->Context, f: ref File)
t := widget(f.tk, ctxt, cfg[0:i]);
cmd := chan of string;
tk->namechan(t, cmd, "cmd");
+ tkclient->onscreen(t, "exact");
+ tkclient->startinput(t, "kbd"::"ptr"::nil);
loop:
for(;;){
- case c := <-cmd {
- "ok" =>
- break loop;
- "cancel" =>
- return;
- * =>
- j = int c;
- set[j] = (tkcmd(t, "variable c"+c) == "1");
+ alt{
+ s := <-t.ctxt.kbd =>
+ tk->keyboard(t, s);
+ s := <-t.ctxt.ptr =>
+ tk->pointer(t, *s);
+ c := <-cmd =>
+ case c {
+ "ok" =>
+ break loop;
+ "cancel" =>
+ return;
+ * =>
+ j = int c;
+ set[j] = (tkcmd(t, "variable c"+c) == "1");
+ }
}
}
for(j=0; j<NEXTRA; j++){