<div class="gmail_quote">On Fri, Oct 28, 2011 at 11:57 AM, Max Vlasov <span dir="ltr"><<a href="mailto:max.vlasov@gmail.com">max.vlasov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I can fix the first problem just by little extra code that switches between the current size and Bounds(0, 0, Screen.Width, Screen.Height),....<br></blockquote><div><br>While trying to implement this particular workaround, noticed also a strange thing<br>
<br>The following "toggle maximize" code can't restore the borderless window (BorderStyle = bsNone) to the previous state (at least on Ubuntu). So looks like GTK detected that I maximize to full screen, so it hidden both toolbars, but later for some reasons don't accept BoundsRect:=fLastRestoreRect; , the window still stays in the full-screen state. Only if I wrap the restore into Visible:=false/Visible:=true it works. <br>
<br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> if fIsMaximized then<br> begin<br> // Visible:=false;;<br> BoundsRect:=fLastRestoreRect;<br> fIsMaximized:=false;<br> // Visible:=true;<br> end<br>
else<br> begin<br> fLastRestoreRect:=BoundsRect;<br> BoundsRect:=Screen.WorkAreaRect;<br> fIsMaximized:=true;<br> end;<br>end;<br><br><br>Max<br></div></div>