Merged revision(s) 53027 #dcbe735606 from trunk:

Carbon: fixed hang with save dialog. issue #29911
........

git-svn-id: branches/fixes_1_6@53784 -
This commit is contained in:
maxim 2016-12-27 22:26:33 +00:00
parent 4f2fce423d
commit b77cf2fae1

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