| @@ -1718,7 +1718,7 @@ widget(parent: ref Tk->Toplevel, ctxt: ref Draw->Context, cfg: array of string): · 1717 unmodified lines |
| 1718 | 1718 | tkcmds(top: ref Tk->Toplevel, a: array of string) |
| 1719 | 1719 | { |
| 1720 | 1720 | for(i := 0; i < len a; i++) |
| 1721 | | − v := tk->cmd(top, a[i]); |
| 1721 | + v := tkcmd(top, a[i]); |
| 1722 | 1722 | } |
| 1723 | 1723 | |
| 1724 | 1724 | 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 · 10 unmodified lines |
| 1735 | 1735 | if(write == 0) |
| 1736 | 1736 | tkcmd(t, "destroy .f.exitclean"); |
| 1737 | 1737 | tkcmd(t, UPDATE); |
| 1738 | + tkclient->onscreen(t, "onscreen"); |
| 1738 | 1739 | cmd := chan of string; |
| 1739 | 1740 | tk->namechan(t, cmd, "cmd"); |
| 1741 | + tkclient->onscreen(t, "exact"); |
| 1742 | + tkclient->startinput(t, "ptr"::nil); |
| 1743 | + for(;;) alt { |
| 1744 | + s := <-t.ctxt.ptr => |
| 1745 | + tk->pointer(t, *s); |
| 1746 | + c := <-cmd => |
| 1747 | + return c; |
| 1748 | + } |
| 1740 | 1749 | return <-cmd; |
| 1741 | 1750 | } |
| 1742 | 1751 | |
| @@ -1843,17 +1852,26 @@ tageditor(ctxt: ref Draw->Context, f: ref File) · 100 unmodified lines |
| 1843 | 1852 | t := widget(f.tk, ctxt, cfg[0:i]); |
| 1844 | 1853 | cmd := chan of string; |
| 1845 | 1854 | tk->namechan(t, cmd, "cmd"); |
| 1855 | + tkclient->onscreen(t, "exact"); |
| 1856 | + tkclient->startinput(t, "kbd"::"ptr"::nil); |
| 1846 | 1857 | |
| 1847 | 1858 | loop: |
| 1848 | 1859 | for(;;){ |
| 1849 | | − case c := <-cmd { |
| 1850 | | − "ok" => |
| 1851 | | − break loop; |
| 1852 | | − "cancel" => |
| 1853 | | − return; |
| 1854 | | − * => |
| 1855 | | − j = int c; |
| 1856 | | − set[j] = (tkcmd(t, "variable c"+c) == "1"); |
| 1860 | + alt{ |
| 1861 | + s := <-t.ctxt.kbd => |
| 1862 | + tk->keyboard(t, s); |
| 1863 | + s := <-t.ctxt.ptr => |
| 1864 | + tk->pointer(t, *s); |
| 1865 | + c := <-cmd => |
| 1866 | + case c { |
| 1867 | + "ok" => |
| 1868 | + break loop; |
| 1869 | + "cancel" => |
| 1870 | + return; |
| 1871 | + * => |
| 1872 | + j = int c; |
| 1873 | + set[j] = (tkcmd(t, "variable c"+c) == "1"); |
| 1874 | + } |
| 1857 | 1875 | } |
| 1858 | 1876 | } |
| 1859 | 1877 | for(j=0; j<NEXTRA; j++){ |