I posted a bug-report containing a oneline fix, but am duplicating it here in case it is useful:

On Delphi and PC Lazarus, if a form is invisible and you call Show, the Form will come forward to the top of the visible z-order.

Carbon Lazarus does not always do that.

Adding one line seems to fix this, for my uses anyway. Perhaps something fancier would be required if there are floating windows, but this one-line fix seems to give better behavior in ordinary circumstances anyway.

In the file carbonprivatewindow.inc, add an extra line to procedure ShowHide(), so it looks like this:

procedure TCarbonWindow.ShowHide(AVisible: Boolean);
begin
//DebugLn('TCarbonWindow.ShowHide ' + DbgSName(LCLobject),' ', DbgS (AVisible));

  if AVisible or (csDesigning in LCLobject.ComponentState) then
  begin
    FPCMacOSAll.ShowWindow(WindowRef(Widget));
    FPCMacOSAll.BringToFront(WindowRef(Widget)); //<< added line >>
  end
  else
    FPCMacOSAll.HideWindow(WindowRef(Widget));
end;

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to