templeos-info/public/Wb/Adam/Win.HC.HTML

574 lines
63 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
<pre id="content">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Windows&quot;</span><span class=cF0>
<a name="l2"></a>#</span><span class=cF1>help_file</span><span class=cF0> </span><span class=cF6>&quot;::/Doc/Windows&quot;</span><span class=cF0>
<a name="l3"></a>
<a name="l4"></a></span><span class=cF9>CMsStateGlbls</span><span class=cF0> </span><span class=cFB>old_ms</span><span class=cF0>={</span><span class=cF7>{</span><span class=cF0>-1000,-1000,0</span><span class=cF7>}</span><span class=cF0>,</span><span class=cF7>{</span><span class=cF0>-1000,-1000,0</span><span class=cF7>}</span><span class=cF0>,</span><span class=cF7>{</span><span class=cF0>-1000,-1000,0</span><span class=cF7>}</span><span class=cF0>,
<a name="l5"></a> </span><span class=cF7>{</span><span class=cF0>0,0,0</span><span class=cF7>}</span><span class=cF0>,</span><span class=cF7>{</span><span class=cF0>1.0,1.0,1.0</span><span class=cF7>}</span><span class=cF0>,0.0,</span><span class=cF5>GetTSC</span><span class=cF0>,0.350,0,0,
<a name="l6"></a> </span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>TRUE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>
<a name="l7"></a>};
<a name="l8"></a>
<a name="l9"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CWinMgrGlbls</span><span class=cF0> </span><span class=cFB>winmgr</span><span class=cF0>={0,0,0,</span><span class=cF3>WINMGR_FPS</span><span class=cF0>,</span><span class=cF5>tS</span><span class=cF0>,</span><span class=cF5>tS</span><span class=cF0>,</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>,</span><span class=cF3>FALSE</span><span class=cF0>};
<a name="l10"></a></span><span class=cFB>winmgr</span><span class=cF0>.t=</span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CWinMgrTimingGlbls</span><span class=cF7>)</span><span class=cF0>);
<a name="l11"></a></span><span class=cFB>winmgr</span><span class=cF0>.t-&gt;last_calc_idle_time=</span><span class=cF5>tS</span><span class=cF0>;
<a name="l12"></a>
<a name="l13"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>ProgressBarsRegTf</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *path=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l14"></a>{
<a name="l15"></a> </span><span class=cF1>F64</span><span class=cF0> t,p1,p2,p3,p4;
<a name="l16"></a> </span><span class=cF1>if</span><span class=cF0> (path) </span><span class=cF7>{</span><span class=cF0>
<a name="l17"></a> t=</span><span class=cF5>tS</span><span class=cF0>;
<a name="l18"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>progress1_t0</span><span class=cF0>) p1=t-</span><span class=cFB>progress1_t0</span><span class=cF0>; </span><span class=cF1>else</span><span class=cF0> p1=0;
<a name="l19"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>progress2_t0</span><span class=cF0>) p2=t-</span><span class=cFB>progress2_t0</span><span class=cF0>; </span><span class=cF1>else</span><span class=cF0> p2=0;
<a name="l20"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>progress3_t0</span><span class=cF0>) p3=t-</span><span class=cFB>progress3_t0</span><span class=cF0>; </span><span class=cF1>else</span><span class=cF0> p3=0;
<a name="l21"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>progress4_t0</span><span class=cF0>) p4=t-</span><span class=cFB>progress4_t0</span><span class=cF0>; </span><span class=cF1>else</span><span class=cF0> p4=0;
<a name="l22"></a> </span><span class=cF5>RegWrite</span><span class=cF0>(path,</span><span class=cF6>&quot;progress1_tf=%0.3f;progress2_tf=%0.3f;\n&quot;</span><span class=cF0>
<a name="l23"></a> </span><span class=cF6>&quot;progress3_tf=%0.3f;progress4_tf=%0.3f;\n&quot;</span><span class=cF0>,p1,p2,p3,p4);
<a name="l24"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l25"></a>}
<a name="l26"></a>
<a name="l27"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF0> 20
<a name="l28"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF0> (3*</span><span class=cF3>GR_WIDTH</span><span class=cF0>/4)
<a name="l29"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DrawProgressBars</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l30"></a>{
<a name="l31"></a> </span><span class=cF9>I64</span><span class=cF0> i,j,k,n,m;
<a name="l32"></a> </span><span class=cF1>U8</span><span class=cF0> *st,*st2;
<a name="l33"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;</span><span class=cF3>PROGRESS_BARS_NUM</span><span class=cF0>;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l34"></a> </span><span class=cF1>if</span><span class=cF0> (m=</span><span class=cFB>sys_progresses</span><span class=cF0>[i].max) {
<a name="l35"></a> dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l36"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc,
<a name="l37"></a> </span><span class=cF7>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>-</span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF7>)</span><span class=cF0>/2,
<a name="l38"></a> </span><span class=cF7>(</span><span class=cF3>GR_HEIGHT</span><span class=cF0>-(</span><span class=cF3>PROGRESS_BARS_NUM</span><span class=cF0>*2-1-i*4)*</span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF7>)</span><span class=cF0>/2,
<a name="l39"></a> </span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF0>,</span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF0>);
<a name="l40"></a>
<a name="l41"></a> dc-&gt;color=</span><span class=cF3>LTGREEN</span><span class=cF0>;
<a name="l42"></a> n=</span><span class=cFB>sys_progresses</span><span class=cF0>[i].val;
<a name="l43"></a> </span><span class=cF1>if</span><span class=cF0> (n&gt;m)
<a name="l44"></a> n=m;
<a name="l45"></a> </span><span class=cF5>GrRect</span><span class=cF0>(dc,
<a name="l46"></a> </span><span class=cF7>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>-</span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF7>)</span><span class=cF0>/2+2,
<a name="l47"></a> </span><span class=cF7>(</span><span class=cF3>GR_HEIGHT</span><span class=cF0>-(</span><span class=cF3>PROGRESS_BARS_NUM</span><span class=cF0>*2-1-i*4)*</span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF7>)</span><span class=cF0>/2+2,
<a name="l48"></a> n*</span><span class=cF7>(</span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF0>-4</span><span class=cF7>)</span><span class=cF0>/m,
<a name="l49"></a> </span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF0>-4);
<a name="l50"></a>
<a name="l51"></a> </span><span class=cF1>if</span><span class=cF0> (m&gt;1) </span><span class=cF7>{</span><span class=cF0>
<a name="l52"></a> dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l53"></a> k=m-1;
<a name="l54"></a> </span><span class=cF1>if</span><span class=cF0> (k&gt;19) k=19;
<a name="l55"></a> </span><span class=cF1>for</span><span class=cF0> (j=0;j&lt;=k;j++)
<a name="l56"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,
<a name="l57"></a> </span><span class=cF7>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>-</span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF7>)</span><span class=cF0>/2+1+j*
<a name="l58"></a> </span><span class=cF7>(</span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF0>-4</span><span class=cF7>)</span><span class=cF0>/</span><span class=cF5>ToF64</span><span class=cF7>(</span><span class=cF0>k+1</span><span class=cF7>)</span><span class=cF0>,
<a name="l59"></a> </span><span class=cF7>(</span><span class=cF3>GR_HEIGHT</span><span class=cF0>-(</span><span class=cF3>PROGRESS_BARS_NUM</span><span class=cF0>*2-1-i*4)*
<a name="l60"></a> </span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF7>)</span><span class=cF0>/2+4,
<a name="l61"></a> </span><span class=cF7>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>-</span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF7>)</span><span class=cF0>/2+1+j*
<a name="l62"></a> </span><span class=cF7>(</span><span class=cF3>PROGRESS_BAR_WIDTH</span><span class=cF0>-4</span><span class=cF7>)</span><span class=cF0>/</span><span class=cF5>ToF64</span><span class=cF7>(</span><span class=cF0>k+1</span><span class=cF7>)</span><span class=cF0>,
<a name="l63"></a> </span><span class=cF7>(</span><span class=cF3>GR_HEIGHT</span><span class=cF0>-(</span><span class=cF3>PROGRESS_BARS_NUM</span><span class=cF0>*2-3-i*4)*
<a name="l64"></a> </span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF7>)</span><span class=cF0>/2-4);
<a name="l65"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l66"></a>
<a name="l67"></a> dc-&gt;color=</span><span class=cF3>GREEN</span><span class=cF0>;
<a name="l68"></a> </span><span class=cF1>if</span><span class=cF0> (*</span><span class=cFB>sys_progresses</span><span class=cF0>[i].desc)
<a name="l69"></a> st=</span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cFB>sys_progresses</span><span class=cF0>[i].desc);
<a name="l70"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l71"></a> st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%d/%d&quot;</span><span class=cF0>,n,m);
<a name="l72"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_progresses</span><span class=cF0>[i].t0) </span><span class=cF7>{</span><span class=cF0>
<a name="l73"></a> st2=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%s %fs&quot;</span><span class=cF0>,st,</span><span class=cF5>tS</span><span class=cF0>-</span><span class=cFB>sys_progresses</span><span class=cF0>[i].t0);
<a name="l74"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l75"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l76"></a> st2=st;
<a name="l77"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_progresses</span><span class=cF0>[i].tf) </span><span class=cF7>{</span><span class=cF0>
<a name="l78"></a> st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%s/%fs&quot;</span><span class=cF0>,st2,</span><span class=cFB>sys_progresses</span><span class=cF0>[i].tf);
<a name="l79"></a> </span><span class=cF5>Free</span><span class=cF0>(st2);
<a name="l80"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l81"></a> st=st2;
<a name="l82"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,</span><span class=cF7>(</span><span class=cF3>GR_WIDTH</span><span class=cF0>-</span><span class=cF3>FONT_WIDTH</span><span class=cF0>*</span><span class=cF5>StrLen</span><span class=cF0>(st)</span><span class=cF7>)</span><span class=cF0>/2,</span><span class=cF7>(</span><span class=cF3>GR_HEIGHT</span><span class=cF0>-</span><span class=cF3>FONT_HEIGHT</span><span class=cF0>-
<a name="l83"></a> (</span><span class=cF3>PROGRESS_BARS_NUM</span><span class=cF0>*2-2-i*4)*</span><span class=cF3>PROGRESS_BAR_HEIGHT</span><span class=cF7>)</span><span class=cF0>/2,</span><span class=cF6>&quot;%s&quot;</span><span class=cF0>,st);
<a name="l84"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l85"></a> }
<a name="l86"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l87"></a>}
<a name="l88"></a>
<a name="l89"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DrawWinGrid</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l90"></a>{
<a name="l91"></a> </span><span class=cF1>F64</span><span class=cF0> d;
<a name="l92"></a> dc-&gt;color=</span><span class=cF3>BLACK</span><span class=cF0>;
<a name="l93"></a> dc-&gt;thick=1;
<a name="l94"></a> </span><span class=cF1>for</span><span class=cF0> (d=</span><span class=cFB>ms_grid</span><span class=cF0>.x_offset;d&lt;</span><span class=cF3>GR_WIDTH</span><span class=cF0>; d+=</span><span class=cFB>ms_grid</span><span class=cF0>.x)
<a name="l95"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,d,0,d,</span><span class=cF3>GR_HEIGHT</span><span class=cF0>-1);
<a name="l96"></a> </span><span class=cF1>for</span><span class=cF0> (d=</span><span class=cFB>ms_grid</span><span class=cF0>.y_offset;d&lt;</span><span class=cF3>GR_HEIGHT</span><span class=cF0>;d+=</span><span class=cFB>ms_grid</span><span class=cF0>.y)
<a name="l97"></a> </span><span class=cF5>GrLine</span><span class=cF0>(dc,0,d,</span><span class=cF3>GR_WIDTH</span><span class=cF0>-1,d);
<a name="l98"></a>}
<a name="l99"></a>
<a name="l100"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinGrid</span><span class=cF0>(</span><span class=cF1>Bool</span><span class=cF0> val)
<a name="l101"></a>{
<a name="l102"></a> </span><span class=cF9>CGridGlbls</span><span class=cF0> last_grid;
<a name="l103"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&amp;last_grid,&amp;</span><span class=cFB>ms_grid</span><span class=cF0>,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CGridGlbls</span><span class=cF7>)</span><span class=cF0>);
<a name="l104"></a> </span><span class=cF1>if</span><span class=cF0> (!val || </span><span class=cF5>PopUpForm</span><span class=cF7>(</span><span class=cF0>&amp;</span><span class=cFB>ms_grid</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l105"></a> </span><span class=cF1>if</span><span class=cF0> (!val)
<a name="l106"></a> </span><span class=cF5>GridInit</span><span class=cF0>;
<a name="l107"></a> </span><span class=cFB>ms_hard</span><span class=cF0>.prescale.x*=last_grid.x_speed/</span><span class=cFB>ms_grid</span><span class=cF0>.x_speed;
<a name="l108"></a> </span><span class=cFB>ms_hard</span><span class=cF0>.prescale.y*=last_grid.y_speed/</span><span class=cFB>ms_grid</span><span class=cF0>.y_speed;
<a name="l109"></a> </span><span class=cFB>ms_hard</span><span class=cF0>.prescale.z*=last_grid.z_speed/</span><span class=cFB>ms_grid</span><span class=cF0>.z_speed;
<a name="l110"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l111"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&amp;</span><span class=cFB>ms_grid</span><span class=cF0>,&amp;last_grid,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CGridGlbls</span><span class=cF7>)</span><span class=cF0>);
<a name="l112"></a>}
<a name="l113"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>CtrlAltG</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> sc)
<a name="l114"></a>{
<a name="l115"></a> </span><span class=cF1>if</span><span class=cF0> (sc&amp;</span><span class=cF3>SCF_SHIFT</span><span class=cF0>)
<a name="l116"></a> </span><span class=cF5>PopUp</span><span class=cF0>(</span><span class=cF6>&quot;WinGrid(OFF);&quot;</span><span class=cF0>);
<a name="l117"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l118"></a> </span><span class=cF5>PopUp</span><span class=cF0>(</span><span class=cF6>&quot;WinGrid(ON);&quot;</span><span class=cF0>);
<a name="l119"></a>}
<a name="l120"></a></span><span class=cF5>CtrlAltCBSet</span><span class=cF0>(</span><span class=cF6>'G'</span><span class=cF0>,&amp;</span><span class=cF5>CtrlAltG</span><span class=cF0>,</span><span class=cF6>&quot;Cmd /Grid On&quot;</span><span class=cF0>,
<a name="l121"></a> </span><span class=cF6>&quot;Cmd /Grid Off&quot;</span><span class=cF0>);
<a name="l122"></a>
<a name="l123"></a></span><span class=cF9>CTask</span><span class=cF0> *</span><span class=cFB>ext_ASCII_task</span><span class=cF0>;
<a name="l124"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>ExtendedASCII</span><span class=cF0>()
<a name="l125"></a>{
<a name="l126"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l127"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF5>DocNew</span><span class=cF0>;
<a name="l128"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;Sel Char and Press &lt;ESC&gt;\n$LTBLUE$&quot;</span><span class=cF0>);
<a name="l129"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;256;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l130"></a> </span><span class=cF1>if</span><span class=cF0> (i&gt;=</span><span class=cF3>CH_SHIFT_SPACE</span><span class=cF0> &amp;&amp; i!=0x7F) {
<a name="l131"></a> </span><span class=cF1>if</span><span class=cF0> (i==</span><span class=cF3>CH_SHIFT_SPACE</span><span class=cF0>)
<a name="l132"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$MU-UL,\&quot;\\x1F\&quot;,LE=%d$&quot;</span><span class=cF0>,i);
<a name="l133"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (i==</span><span class=cF6>'$'</span><span class=cF0>)
<a name="l134"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$MU-UL,\&quot;\\x24\&quot;,LE=%d$&quot;</span><span class=cF0>,i);
<a name="l135"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (i==</span><span class=cF6>'\&quot;'</span><span class=cF0>||i==</span><span class=cF6>'\\'</span><span class=cF0>)
<a name="l136"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$MU-UL,\&quot;\\%c\&quot;,LE=%d$&quot;</span><span class=cF0>,i,i);
<a name="l137"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l138"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$MU-UL,\&quot;%c\&quot;,LE=%d$&quot;</span><span class=cF0>,i,i);
<a name="l139"></a> } </span><span class=cF1>else</span><span class=cF0>
<a name="l140"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot; &quot;</span><span class=cF0>);
<a name="l141"></a> </span><span class=cF1>if</span><span class=cF0> (i&amp;15==15)
<a name="l142"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l143"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l144"></a> i=</span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
<a name="l145"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l146"></a> </span><span class=cF1>if</span><span class=cF0> (i&gt;=0)
<a name="l147"></a> </span><span class=cF5>PostMsg</span><span class=cF0>(</span><span class=cFB>ext_ASCII_task</span><span class=cF0>,</span><span class=cF3>MSG_KEY_DOWN_UP</span><span class=cF0>,i,</span><span class=cF5>Char2ScanCode</span><span class=cF7>(</span><span class=cF0>i</span><span class=cF7>)</span><span class=cF0>);
<a name="l148"></a>}
<a name="l149"></a>
<a name="l150"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>CtrlAltA</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0>)
<a name="l151"></a>{
<a name="l152"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ext_ASCII_task</span><span class=cF0>=</span><span class=cFB>sys_focus_task</span><span class=cF0>)
<a name="l153"></a> </span><span class=cF5>Spawn</span><span class=cF0>(&amp;</span><span class=cF5>ExtendedASCII</span><span class=cF0>);
<a name="l154"></a>}
<a name="l155"></a></span><span class=cF5>CtrlAltCBSet</span><span class=cF0>(</span><span class=cF6>'A'</span><span class=cF0>,&amp;</span><span class=cF5>CtrlAltA</span><span class=cF0>,</span><span class=cF6>&quot;Cmd /Extended ASCII&quot;</span><span class=cF0>);
<a name="l156"></a>
<a name="l157"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinScrollNull</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task,</span><span class=cF9>CD3I64</span><span class=cF0> *s)
<a name="l158"></a>{</span><span class=cF2>//If panning a window has been done, restore to zero.</span><span class=cF0>
<a name="l159"></a> s-&gt;x=task-&gt;scroll_x;
<a name="l160"></a> s-&gt;y=task-&gt;scroll_y;
<a name="l161"></a> s-&gt;z=task-&gt;scroll_z;
<a name="l162"></a> task-&gt;scroll_x=0;
<a name="l163"></a> task-&gt;scroll_y=0;
<a name="l164"></a> task-&gt;scroll_z=0;
<a name="l165"></a>}
<a name="l166"></a>
<a name="l167"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinScrollRestore</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task,</span><span class=cF9>CD3I64</span><span class=cF0> *s)
<a name="l168"></a>{</span><span class=cF2>//Set window pan value to stored value.</span><span class=cF0>
<a name="l169"></a> task-&gt;scroll_x=s-&gt;x;
<a name="l170"></a> task-&gt;scroll_y=s-&gt;y;
<a name="l171"></a> task-&gt;scroll_z=s-&gt;z;
<a name="l172"></a>}
<a name="l173"></a>
<a name="l174"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DrawMs</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l175"></a>{
<a name="l176"></a> </span><span class=cF9>I64</span><span class=cF0> x,y;
<a name="l177"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l178"></a> </span><span class=cF1>CLI</span><span class=cF0>
<a name="l179"></a> x=</span><span class=cFB>ms</span><span class=cF0>.pos.x;
<a name="l180"></a> y=</span><span class=cFB>ms</span><span class=cF0>.pos.y;
<a name="l181"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l182"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms</span><span class=cF0>.show &amp;&amp; </span><span class=cFB>ms_hard</span><span class=cF0>.installed) </span><span class=cF7>{</span><span class=cF0>
<a name="l183"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;</span><span class=cFB>sys_run_level</span><span class=cF0>,</span><span class=cF3>RLf_VGA</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF2>//if text mode</span><span class=cF0>
<a name="l184"></a> </span><span class=cFB>gr</span><span class=cF0>.text_base[</span><span class=cFB>ms</span><span class=cF0>.pos_text.x+</span><span class=cFB>ms</span><span class=cF0>.pos_text.y*</span><span class=cF3>TEXT_COLS</span><span class=cF0>]^=0x7F00;
<a name="l185"></a> </span><span class=cF1>else</span><span class=cF0> {
<a name="l186"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>gr</span><span class=cF0>.fp_draw_ms) </span><span class=cF7>{</span><span class=cF0>
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms</span><span class=cF0>.lb)
<a name="l188"></a> dc-&gt;color=</span><span class=cF3>ROP_XOR</span><span class=cF0>+</span><span class=cF3>LTPURPLE</span><span class=cF0>^</span><span class=cF3>TRANSPARENT</span><span class=cF0>;
<a name="l189"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms</span><span class=cF0>.rb)
<a name="l190"></a> dc-&gt;color=</span><span class=cF3>ROP_XOR</span><span class=cF0>+</span><span class=cF3>LTCYAN</span><span class=cF0>^</span><span class=cF3>TRANSPARENT</span><span class=cF0>;
<a name="l191"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l192"></a> dc-&gt;color=</span><span class=cF3>ROP_XOR</span><span class=cF0>+</span><span class=cF3>BLACK</span><span class=cF0>^</span><span class=cF3>TRANSPARENT</span><span class=cF0>;
<a name="l193"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>winmgr</span><span class=cF0>.grab_scroll &amp;&amp; </span><span class=cFB>gr</span><span class=cF0>.fp_draw_grab_ms)
<a name="l194"></a> (*</span><span class=cFB>gr</span><span class=cF0>.fp_draw_grab_ms)(dc,x,y,</span><span class=cFB>winmgr</span><span class=cF0>.grab_scroll_closed);
<a name="l195"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l196"></a> (*</span><span class=cFB>gr</span><span class=cF0>.fp_draw_ms)(dc,x,y);
<a name="l197"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l198"></a> }
<a name="l199"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l200"></a>}
<a name="l201"></a>
<a name="l202"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinFinalUpdate</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc)
<a name="l203"></a>{
<a name="l204"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms_grid</span><span class=cF0>.show)
<a name="l205"></a> </span><span class=cF5>DrawWinGrid</span><span class=cF0>(dc);
<a name="l206"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms_grid</span><span class=cF0>.coord)
<a name="l207"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc,</span><span class=cF3>GR_WIDTH</span><span class=cF0>-</span><span class=cF3>FONT_WIDTH</span><span class=cF0>*10,</span><span class=cF3>FONT_HEIGHT</span><span class=cF0>*3,
<a name="l208"></a> </span><span class=cF6>&quot;(%03d,%03d)&quot;</span><span class=cF0>,</span><span class=cFB>ms</span><span class=cF0>.pos.x,</span><span class=cFB>ms</span><span class=cF0>.pos.y);
<a name="l209"></a> </span><span class=cF5>DrawProgressBars</span><span class=cF0>(dc);
<a name="l210"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>winmgr</span><span class=cF0>.show_menu)
<a name="l211"></a> </span><span class=cF5>DrawMenu</span><span class=cF0>(dc);
<a name="l212"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l213"></a> </span><span class=cFB>sys_cur_submenu_entry</span><span class=cF0>=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l214"></a> </span><span class=cF5>DrawMs</span><span class=cF0>(dc);
<a name="l215"></a>}
<a name="l216"></a>
<a name="l217"></a></span><span class=cFB>gr</span><span class=cF0>.fp_final_scrn_update=&amp;</span><span class=cF5>WinFinalUpdate</span><span class=cF0>;
<a name="l218"></a>
<a name="l219"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinMsUpdate</span><span class=cF0>()
<a name="l220"></a>{
<a name="l221"></a> </span><span class=cF9>I64</span><span class=cF0> dd;
<a name="l222"></a> </span><span class=cF1>Bool</span><span class=cF0> set=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l223"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms_hard</span><span class=cF0>.installed) </span><span class=cF7>{</span><span class=cF0>
<a name="l224"></a> </span><span class=cFB>ms</span><span class=cF0>.has_wheel=</span><span class=cFB>ms_hard</span><span class=cF0>.has_wheel;
<a name="l225"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms_hard</span><span class=cF0>.evt) {
<a name="l226"></a> </span><span class=cF5>MsUpdate</span><span class=cF0>(</span><span class=cFB>ms_hard</span><span class=cF0>.pos.x,</span><span class=cFB>ms_hard</span><span class=cF0>.pos.y,</span><span class=cFB>ms_hard</span><span class=cF0>.pos.z,
<a name="l227"></a> </span><span class=cFB>ms_hard</span><span class=cF0>.bttns[0],</span><span class=cFB>ms_hard</span><span class=cF0>.bttns[1]);
<a name="l228"></a> </span><span class=cFB>ms_hard</span><span class=cF0>.evt=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l229"></a> set=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l230"></a> }
<a name="l231"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l232"></a>
<a name="l233"></a> </span><span class=cF1>if</span><span class=cF0> (set) </span><span class=cF7>{</span><span class=cF0>
<a name="l234"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>ms_hard</span><span class=cF0>.installed) {
<a name="l235"></a> </span><span class=cFB>ms</span><span class=cF0>.speed=</span><span class=cFB>ms_hard</span><span class=cF0>.speed;
<a name="l236"></a> </span><span class=cFB>ms</span><span class=cF0>.timestamp=</span><span class=cFB>ms_hard</span><span class=cF0>.timestamp;
<a name="l237"></a> }
<a name="l238"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l239"></a> </span><span class=cFB>ms</span><span class=cF0>.speed*=0.95;
<a name="l240"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>gr</span><span class=cF0>.scrn_zoom!=1) </span><span class=cF7>{</span><span class=cF0>
<a name="l241"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>gr</span><span class=cF0>.continuous_scroll)
<a name="l242"></a> </span><span class=cF5>GrScaleZoom</span><span class=cF0>(1.0);
<a name="l243"></a> </span><span class=cF1>else</span><span class=cF0> {
<a name="l244"></a> dd=(</span><span class=cFB>ms</span><span class=cF0>.pos.x-</span><span class=cFB>gr</span><span class=cF0>.sx)*</span><span class=cFB>gr</span><span class=cF0>.scrn_zoom;
<a name="l245"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>8&lt;=dd&lt;</span><span class=cF3>GR_WIDTH</span><span class=cF0>-8</span><span class=cF7>)</span><span class=cF0>)
<a name="l246"></a> </span><span class=cF5>GrScaleZoom</span><span class=cF0>(1.0);
<a name="l247"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l248"></a> dd=(</span><span class=cFB>ms</span><span class=cF0>.pos.y-</span><span class=cFB>gr</span><span class=cF0>.sy)*</span><span class=cFB>gr</span><span class=cF0>.scrn_zoom;
<a name="l249"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>8&lt;=dd&lt;</span><span class=cF3>GR_HEIGHT</span><span class=cF0>-8</span><span class=cF7>)</span><span class=cF0>)
<a name="l250"></a> </span><span class=cF5>GrScaleZoom</span><span class=cF0>(1.0);
<a name="l251"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l252"></a> }
<a name="l253"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l254"></a>}
<a name="l255"></a>
<a name="l256"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CTask</span><span class=cF0> *</span><span class=cF5>WinRefocus</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l257"></a>{</span><span class=cF2>//Reset the focus task if NULL.</span><span class=cF0>
<a name="l258"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l259"></a> </span><span class=cF1>CLI</span><span class=cF0>
<a name="l260"></a> </span><span class=cF1>if</span><span class=cF0> (!task) </span><span class=cF7>{</span><span class=cF0>
<a name="l261"></a> task=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>-&gt;last_task;
<a name="l262"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0> &amp;&amp; task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>) {
<a name="l263"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;win_inhibit,</span><span class=cF3>WIf_SELF_FOCUS</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l264"></a> </span><span class=cFB>sys_focus_task</span><span class=cF0>=task;
<a name="l265"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l266"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l267"></a> task=task-&gt;last_task;
<a name="l268"></a> }
<a name="l269"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l270"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l271"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cFB>sys_focus_task</span><span class=cF0>;
<a name="l272"></a>}
<a name="l273"></a>
<a name="l274"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>WinOnTopWindows</span><span class=cF0>()
<a name="l275"></a>{
<a name="l276"></a> </span><span class=cF9>CTask</span><span class=cF0> *task,*task1,*first_moved_fwd=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l277"></a> </span><span class=cF9>I64</span><span class=cF0> res=0;
<a name="l278"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l279"></a> </span><span class=cF1>CLI</span><span class=cF0> </span><span class=cF2>//TODO Multiprocessor safe</span><span class=cF0>
<a name="l280"></a> task=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>-&gt;next_task;
<a name="l281"></a> </span><span class=cF1>while</span><span class=cF0> (task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0> &amp;&amp; task!=first_moved_fwd) </span><span class=cF7>{</span><span class=cF0>
<a name="l282"></a> task1=task-&gt;next_task;
<a name="l283"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>) {
<a name="l284"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l285"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l286"></a> }
<a name="l287"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_WIN_ON_TOP</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l288"></a> task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>-&gt;last_task) {
<a name="l289"></a> </span><span class=cF5>TaskQueRem</span><span class=cF0>(task);
<a name="l290"></a> </span><span class=cF5>TaskQueIns</span><span class=cF0>(task,</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
<a name="l291"></a> res++;
<a name="l292"></a> </span><span class=cF1>if</span><span class=cF0> (!first_moved_fwd)
<a name="l293"></a> first_moved_fwd=task;
<a name="l294"></a> }
<a name="l295"></a> task=task1;
<a name="l296"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l297"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l298"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l299"></a>}
<a name="l300"></a>
<a name="l301"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF1>Bool</span><span class=cF0> update_z_buf=</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l302"></a>{</span><span class=cF2>//Put task's win on top of window stack.</span><span class=cF0>
<a name="l303"></a> </span><span class=cF9>CTask</span><span class=cF0> *task1;
<a name="l304"></a> </span><span class=cF9>I64</span><span class=cF0> res=0;
<a name="l305"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l306"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0> || task-&gt;gs-&gt;num)
<a name="l307"></a> </span><span class=cF1>return</span><span class=cF0> 0;
<a name="l308"></a> </span><span class=cF5>TaskDerivedValsUpdate</span><span class=cF0>(task,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l309"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cFB>sys_winmgr_task</span><span class=cF0> || task==</span><span class=cFB>sys_winmgr_task</span><span class=cF0>)
<a name="l310"></a> </span><span class=cF1>return</span><span class=cF0> 0;
<a name="l311"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l312"></a> </span><span class=cF1>CLI</span><span class=cF0>
<a name="l313"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l314"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l315"></a> </span><span class=cF1>return</span><span class=cF0> 0;
<a name="l316"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l317"></a> </span><span class=cF1>if</span><span class=cF0> (task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>-&gt;last_task) </span><span class=cF7>{</span><span class=cF0>
<a name="l318"></a> </span><span class=cF5>TaskQueRem</span><span class=cF0>(task);
<a name="l319"></a> </span><span class=cF5>TaskQueIns</span><span class=cF0>(task,</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
<a name="l320"></a> res++;
<a name="l321"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l322"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;win_inhibit,</span><span class=cF3>WIf_SELF_FOCUS</span><span class=cF7>)</span><span class=cF0>)
<a name="l323"></a> </span><span class=cFB>sys_focus_task</span><span class=cF0>=task;
<a name="l324"></a> </span><span class=cF1>if</span><span class=cF0> (res &amp;&amp; !</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_CHILDREN_NOT_ON_TOP</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l325"></a> task1=task-&gt;next_child_task;
<a name="l326"></a> </span><span class=cF1>while</span><span class=cF0> (task1!=&amp;task-&gt;next_child_task) {
<a name="l327"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task1</span><span class=cF7>)</span><span class=cF0>)
<a name="l328"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l329"></a> res+=</span><span class=cF5>WinToTop</span><span class=cF0>(task1,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l330"></a> task1=task1-&gt;next_sibling_task;
<a name="l331"></a> }
<a name="l332"></a> </span><span class=cF1>if</span><span class=cF0> (task-&gt;popup_task &amp;&amp;
<a name="l333"></a> task-&gt;popup_task-&gt;parent_task==task)
<a name="l334"></a> res+=</span><span class=cF5>WinToTop</span><span class=cF0>(task-&gt;popup_task,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l335"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l336"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l337"></a> res+=</span><span class=cF5>WinOnTopWindows</span><span class=cF0>;
<a name="l338"></a> </span><span class=cF1>if</span><span class=cF0> (res &amp;&amp; update_z_buf)
<a name="l339"></a> </span><span class=cF5>WinZBufUpdate</span><span class=cF0>;
<a name="l340"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l341"></a>}
<a name="l342"></a></span><span class=cFB>ext</span><span class=cF0>[</span><span class=cF3>EXT_WIN_TO_TOP</span><span class=cF0>]=&amp;</span><span class=cF5>WinToTop</span><span class=cF0>;
<a name="l343"></a>
<a name="l344"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CTask</span><span class=cF0> *</span><span class=cF5>WinFocus</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l345"></a>{</span><span class=cF2>//Set task as focus task.</span><span class=cF0>
<a name="l346"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l347"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l348"></a> </span><span class=cF1>CLI</span><span class=cF0>
<a name="l349"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>||</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;win_inhibit,</span><span class=cF3>WIf_SELF_FOCUS</span><span class=cF7>)</span><span class=cF0>)
<a name="l350"></a> task=</span><span class=cF5>WinRefocus</span><span class=cF0>(</span><span class=cFB>sys_focus_task</span><span class=cF0>);
<a name="l351"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(</span><span class=cFB>sys_focus_task</span><span class=cF0>=task);
<a name="l352"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l353"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cFB>sys_focus_task</span><span class=cF0>;
<a name="l354"></a>}
<a name="l355"></a></span><span class=cFB>ext</span><span class=cF0>[</span><span class=cF3>EXT_WIN_FOCUS</span><span class=cF0>]=&amp;</span><span class=cF5>WinFocus</span><span class=cF0>;
<a name="l356"></a>
<a name="l357"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> left,</span><span class=cF9>I64</span><span class=cF0> right,</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l358"></a>{</span><span class=cF2>//Set task's win left and right columns.</span><span class=cF0>
<a name="l359"></a> </span><span class=cF9>I64</span><span class=cF0> d=right-left;
<a name="l360"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l361"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l362"></a> </span><span class=cF1>if</span><span class=cF0> (d&lt;0) d=0;
<a name="l363"></a> </span><span class=cF1>if</span><span class=cF0> (left&gt;=</span><span class=cF3>TEXT_COLS</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l364"></a> left=</span><span class=cF3>TEXT_COLS</span><span class=cF0>-1;
<a name="l365"></a> right=left+d;
<a name="l366"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l367"></a> </span><span class=cF1>if</span><span class=cF0> (right&lt;0) </span><span class=cF7>{</span><span class=cF0>
<a name="l368"></a> right=0;
<a name="l369"></a> left=right-d;
<a name="l370"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l371"></a> </span><span class=cF1>if</span><span class=cF0> (left&gt;right) </span><span class=cF7>{</span><span class=cF0>
<a name="l372"></a> </span><span class=cF1>if</span><span class=cF0> (left&gt;0)
<a name="l373"></a> right=left;
<a name="l374"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l375"></a> left=right;
<a name="l376"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l377"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l378"></a> </span><span class=cF1>CLI</span><span class=cF0> </span><span class=cF2>//TODO Multiprocessor safe</span><span class=cF0>
<a name="l379"></a> </span><span class=cF1>if</span><span class=cF0> (task-&gt;win_left!=left || task-&gt;win_right!=right) </span><span class=cF7>{</span><span class=cF0>
<a name="l380"></a> task-&gt;win_left=left;
<a name="l381"></a> task-&gt;win_right=right;
<a name="l382"></a> </span><span class=cF5>TaskDerivedValsUpdate</span><span class=cF0>(task);
<a name="l383"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l384"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l385"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l386"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l387"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l388"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l389"></a>}
<a name="l390"></a>
<a name="l391"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> top,</span><span class=cF9>I64</span><span class=cF0> bottom,</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l392"></a>{</span><span class=cF2>//Set task's win top and bottom rows.</span><span class=cF0>
<a name="l393"></a> </span><span class=cF9>I64</span><span class=cF0> d=bottom-top;
<a name="l394"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l395"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l396"></a> </span><span class=cF1>if</span><span class=cF0> (d&lt;0) d=0;
<a name="l397"></a> </span><span class=cF1>if</span><span class=cF0> (top&gt;=</span><span class=cF3>TEXT_ROWS</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l398"></a> top=</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-1;
<a name="l399"></a> bottom=top+d;
<a name="l400"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l401"></a> </span><span class=cF1>if</span><span class=cF0> (bottom&lt;=0) </span><span class=cF7>{</span><span class=cF0>
<a name="l402"></a> bottom=1;
<a name="l403"></a> top=bottom-d;
<a name="l404"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l405"></a> </span><span class=cF1>if</span><span class=cF0> (top&gt;bottom) </span><span class=cF7>{</span><span class=cF0>
<a name="l406"></a> </span><span class=cF1>if</span><span class=cF0> (top&gt;=0)
<a name="l407"></a> bottom=top;
<a name="l408"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l409"></a> top=bottom;
<a name="l410"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l411"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l412"></a> </span><span class=cF1>CLI</span><span class=cF0> </span><span class=cF2>//TODO Multiprocessor safe</span><span class=cF0>
<a name="l413"></a> </span><span class=cF1>if</span><span class=cF0> (task-&gt;win_top!=top || task-&gt;win_bottom!=bottom) </span><span class=cF7>{</span><span class=cF0>
<a name="l414"></a> task-&gt;win_top=top;
<a name="l415"></a> task-&gt;win_bottom=bottom;
<a name="l416"></a> </span><span class=cF5>TaskDerivedValsUpdate</span><span class=cF0>(task);
<a name="l417"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l418"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l419"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l420"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l421"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l422"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l423"></a>}
<a name="l424"></a>
<a name="l425"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinTileHorz</span><span class=cF0>()
<a name="l426"></a>{</span><span class=cF2>//Tile windows horizontally top-to-bottom.</span><span class=cF0>
<a name="l427"></a> </span><span class=cF9>CTask</span><span class=cF0> *task,*last_task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l428"></a> </span><span class=cF9>I64</span><span class=cF0> cnt,c,i,vert_size,no_border;
<a name="l429"></a>
<a name="l430"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l431"></a> </span><span class=cF1>CLI</span><span class=cF0> </span><span class=cF2>//TODO Multiprocessor safe</span><span class=cF0>
<a name="l432"></a> task=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>;
<a name="l433"></a> cnt=0;
<a name="l434"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l435"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;win_inhibit,</span><span class=cF3>WIf_SELF_FOCUS</span><span class=cF7>)</span><span class=cF0>)
<a name="l436"></a> cnt++;
<a name="l437"></a> task=task-&gt;last_task;
<a name="l438"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>while</span><span class=cF0> (task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
<a name="l439"></a>
<a name="l440"></a> task=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>;
<a name="l441"></a> i=0;
<a name="l442"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l443"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;win_inhibit,</span><span class=cF3>WIf_SELF_FOCUS</span><span class=cF7>)</span><span class=cF0>) {
<a name="l444"></a> no_border=</span><span class=cF5>Bt</span><span class=cF0>(&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_NO_BORDER</span><span class=cF0>);
<a name="l445"></a> c=cnt- i&amp;~3;
<a name="l446"></a> </span><span class=cF1>if</span><span class=cF0> (!c)
<a name="l447"></a> c=1;
<a name="l448"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (c&gt;4)
<a name="l449"></a> c=4;
<a name="l450"></a> vert_size=(</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-1)/c;
<a name="l451"></a>
<a name="l452"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(1-no_border,</span><span class=cF3>TEXT_COLS</span><span class=cF0>-2+no_border,task);
<a name="l453"></a> </span><span class=cF5>WinVert</span><span class=cF0>(</span><span class=cF7>(</span><span class=cF0>i&amp;3</span><span class=cF7>)</span><span class=cF0>*vert_size+2-no_border,</span><span class=cF7>(</span><span class=cF0>i&amp;3+1</span><span class=cF7>)</span><span class=cF0>*vert_size+no_border,task);
<a name="l454"></a> last_task=task;
<a name="l455"></a> </span><span class=cF1>if</span><span class=cF0> (i&amp;3==3)
<a name="l456"></a> </span><span class=cF5>WinVert</span><span class=cF0>(task-&gt;win_top,</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-2,task);
<a name="l457"></a> i++;
<a name="l458"></a> }
<a name="l459"></a> task=task-&gt;last_task;
<a name="l460"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>while</span><span class=cF0> (task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
<a name="l461"></a> </span><span class=cF5>WinVert</span><span class=cF0>(last_task-&gt;win_top,</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-2,last_task);
<a name="l462"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l463"></a>}
<a name="l464"></a>
<a name="l465"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinTileVert</span><span class=cF0>()
<a name="l466"></a>{</span><span class=cF2>//Tile windows vertically side-by-side.</span><span class=cF0>
<a name="l467"></a> </span><span class=cF9>CTask</span><span class=cF0> *task,*last_task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l468"></a> </span><span class=cF9>I64</span><span class=cF0> cnt,c,i,horz_size,no_border;
<a name="l469"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l470"></a> </span><span class=cF1>CLI</span><span class=cF0> </span><span class=cF2>//TODO Multiprocessor safe</span><span class=cF0>
<a name="l471"></a> task=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>;
<a name="l472"></a> cnt=0;
<a name="l473"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l474"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;win_inhibit,</span><span class=cF3>WIf_SELF_FOCUS</span><span class=cF7>)</span><span class=cF0>)
<a name="l475"></a> cnt++;
<a name="l476"></a> task=task-&gt;last_task;
<a name="l477"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>while</span><span class=cF0> (task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
<a name="l478"></a>
<a name="l479"></a> task=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>;
<a name="l480"></a> i=0;
<a name="l481"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l482"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;task-&gt;win_inhibit,</span><span class=cF3>WIf_SELF_FOCUS</span><span class=cF7>)</span><span class=cF0>) {
<a name="l483"></a> no_border=</span><span class=cF5>Bt</span><span class=cF0>(&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_NO_BORDER</span><span class=cF0>);
<a name="l484"></a> c=cnt- i&amp;~3;
<a name="l485"></a> </span><span class=cF1>if</span><span class=cF0> (!c)
<a name="l486"></a> c=1;
<a name="l487"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (c&gt;4)
<a name="l488"></a> c=4;
<a name="l489"></a> horz_size=</span><span class=cF3>TEXT_COLS</span><span class=cF0>/c;
<a name="l490"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF7>(</span><span class=cF0>i&amp;3</span><span class=cF7>)</span><span class=cF0>*horz_size+1-no_border,</span><span class=cF7>(</span><span class=cF0>i&amp;3+1</span><span class=cF7>)</span><span class=cF0>*horz_size-1+no_border,task);
<a name="l491"></a> </span><span class=cF5>WinVert</span><span class=cF0>(2-no_border,</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-2+no_border,task);
<a name="l492"></a> last_task=task;
<a name="l493"></a> </span><span class=cF1>if</span><span class=cF0> (i&amp;3==3)
<a name="l494"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(task-&gt;win_left,</span><span class=cF3>TEXT_COLS</span><span class=cF0>-2,task);
<a name="l495"></a> i++;
<a name="l496"></a> }
<a name="l497"></a> task=task-&gt;last_task;
<a name="l498"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>while</span><span class=cF0> (task!=</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
<a name="l499"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(last_task-&gt;win_left,</span><span class=cF3>TEXT_COLS</span><span class=cF0>-2,last_task);
<a name="l500"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l501"></a>}
<a name="l502"></a>
<a name="l503"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WinMax</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l504"></a>{</span><span class=cF2>//Maximize task's window</span><span class=cF0>
<a name="l505"></a> </span><span class=cF9>I64</span><span class=cF0> no_border;
<a name="l506"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l507"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF1>return</span><span class=cF0>;
<a name="l508"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l509"></a> </span><span class=cF1>CLI</span><span class=cF0> </span><span class=cF2>//TODO Multiprocessor safe</span><span class=cF0>
<a name="l510"></a> no_border=</span><span class=cF5>Bt</span><span class=cF0>(&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_NO_BORDER</span><span class=cF0>);
<a name="l511"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(1-no_border,</span><span class=cF3>TEXT_COLS</span><span class=cF0>-2+no_border,task);
<a name="l512"></a> </span><span class=cF5>WinVert</span><span class=cF0>(2-no_border,</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-2+no_border,task);
<a name="l513"></a> </span><span class=cF5>WinToTop</span><span class=cF0>(task);
<a name="l514"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l515"></a>}
<a name="l516"></a>
<a name="l517"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>WinBorder</span><span class=cF0>(</span><span class=cF1>Bool</span><span class=cF0> val=</span><span class=cF3>OFF</span><span class=cF0>,</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l518"></a>{</span><span class=cF2>//Turn off (or on) window border.</span><span class=cF0>
<a name="l519"></a> </span><span class=cF1>Bool</span><span class=cF0> old_has_border;
<a name="l520"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l521"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l522"></a> </span><span class=cF1>PUSHFD</span><span class=cF0>
<a name="l523"></a> </span><span class=cF1>CLI</span><span class=cF0> </span><span class=cF2>//TODO Multiprocessor safe</span><span class=cF0>
<a name="l524"></a> old_has_border=!</span><span class=cF5>Bt</span><span class=cF0>(&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_NO_BORDER</span><span class=cF0>);
<a name="l525"></a> </span><span class=cF1>if</span><span class=cF0> (val) </span><span class=cF7>{</span><span class=cF0>
<a name="l526"></a> </span><span class=cF1>if</span><span class=cF0> (!old_has_border) {
<a name="l527"></a> </span><span class=cF5>LBtr</span><span class=cF0>(&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_NO_BORDER</span><span class=cF0>);
<a name="l528"></a> task-&gt;win_left++; task-&gt;win_right--;
<a name="l529"></a> task-&gt;win_top++; task-&gt;win_bottom--;
<a name="l530"></a> </span><span class=cF5>TaskDerivedValsUpdate</span><span class=cF0>(task,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l531"></a> }
<a name="l532"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l533"></a> </span><span class=cF1>if</span><span class=cF0> (old_has_border) {
<a name="l534"></a> </span><span class=cF5>LBts</span><span class=cF0>(&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_NO_BORDER</span><span class=cF0>);
<a name="l535"></a> task-&gt;win_left--; task-&gt;win_right++;
<a name="l536"></a> task-&gt;win_top--; task-&gt;win_bottom++;
<a name="l537"></a> </span><span class=cF5>TaskDerivedValsUpdate</span><span class=cF0>(task,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l538"></a> }
<a name="l539"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l540"></a> </span><span class=cF1>POPFD</span><span class=cF0>
<a name="l541"></a> </span><span class=cF1>return</span><span class=cF0> old_has_border;
<a name="l542"></a>}
</span></pre></body>
</html>