On Fri, Oct 28, 2011 at 11:57 AM, Max Vlasov <[email protected]> wrote:
> 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),....
>
While trying to implement this particular workaround, noticed also a
strange thing
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.
procedure TForm1.Button1Click(Sender: TObject);
begin
if fIsMaximized then
begin
// Visible:=false;;
BoundsRect:=fLastRestoreRect;
fIsMaximized:=false;
// Visible:=true;
end
else
begin
fLastRestoreRect:=BoundsRect;
BoundsRect:=Screen.WorkAreaRect;
fIsMaximized:=true;
end;
end;
Max
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus