Carbon: fixed hang with save dialog. issue #29911

git-svn-id: trunk@53027 -
This commit is contained in:
zeljko 2016-09-25 08:16:20 +00:00
parent 8011372f5a
commit dcbe735606

View File

@ -1811,8 +1811,11 @@ begin
DebugLn('TCarbonWidgetSet.GetParent Widget: ' + DbgS(TCarbonControl(Handle).Widget));
{$ENDIF}
Result := HWnd(GetCarbonWidget(HIViewGetSuperview(TCarbonControl(Handle).Widget)));
if Result = 0 then // no parent control => then parent is a window?
if Result = 0 then begin // no parent control => then parent is a window?
Result := HWnd(GetCarbonWidget(HIViewGetWindow(TCarbonControl(Handle).Widget)));
if Result = Handle then
Result := 0; // Sanity check - otherwise FindLCLWindow can be stuck in a loop
end;
end;
// Carbon windows has no parent