mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 05:37:38 +01:00
carbon:
- fix GetParent - return parent windows too (forms), not only parent controls - if control is disabled then perform mouse action from first non-disabled control parent (fixes issue #0017856) git-svn-id: trunk@28613 -
This commit is contained in:
parent
98d8c393c9
commit
dacbb79dc4
@ -285,6 +285,8 @@ begin
|
||||
if Control = nil then Exit;
|
||||
|
||||
Widget := GetCarbonWidget(Control);
|
||||
while Assigned(Widget) and not Widget.IsEnabled do
|
||||
Widget := TCarbonWidget(CarbonWidgetset.GetParent(HWND(Widget)));
|
||||
if Widget = nil then Exit;
|
||||
|
||||
FillChar(Msg, SizeOf(Msg), 0);
|
||||
|
||||
@ -1768,8 +1768,11 @@ begin
|
||||
if not CheckWidget(Handle, 'GetParent') then Exit;
|
||||
|
||||
if TCarbonWidget(Handle) is TCarbonControl then
|
||||
Result :=
|
||||
HWnd(GetCarbonWidget(HIViewGetSuperview(TCarbonControl(Handle).Widget)));
|
||||
begin
|
||||
Result := HWnd(GetCarbonWidget(HIViewGetSuperview(TCarbonControl(Handle).Widget)));
|
||||
if Result = 0 then // no parent control => then parent is a window?
|
||||
Result := HWnd(GetCarbonWidget(HIViewGetWindow(TCarbonControl(Handle).Widget)));
|
||||
end;
|
||||
// Carbon windows has no parent
|
||||
|
||||
{$IFDEF VerboseWinAPI}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user