LCL carbon: applied patch #0011070: Two fixes for Carbon Tabs from Tobias Giesen

git-svn-id: trunk@14733 -
This commit is contained in:
tombo 2008-04-02 12:40:59 +00:00
parent 3880c2d0cd
commit ae57a5e457
2 changed files with 6 additions and 3 deletions

View File

@ -28,6 +28,7 @@ function CarbonControl_Hit(ANextHandler: EventHandlerCallRef;
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
var
ControlPart: ControlPartCode;
LCLTarget: TWinControl;
begin
{$IFDEF VerboseControlEvent}
DebugLn('CarbonControl_Hit: ', DbgSName(AWidget.LCLObject));
@ -40,10 +41,12 @@ begin
SizeOf(ControlPartCode), nil, @ControlPart), 'CarbonControl_Hit', SGetEvent,
SControlPart) then Exit;
// save LCL target now as the widget might be removed within hit
LCLTarget := AWidget.LCLObject;
(AWidget as TCarbonControl).Hit(ControlPart);
// send postponed mouse up event
DeliverMessage(AWidget.LCLObject, SavedMouseUpMsg);
DeliverMessage(LCLTarget, SavedMouseUpMsg);
NotifyApplicationUserInput(SavedMouseUpMsg.Msg);
CarbonWidgetSet.SetCaptureWidget(0); // capture is released

View File

@ -684,7 +684,7 @@ begin
Exit;
end;
SetPageIndex(Index);
SetPageIndex(PIndex); // we must use page index!
// send change
FillChar(Msg, SizeOf(TLMNotify), 0);
@ -845,7 +845,7 @@ end;
{------------------------------------------------------------------------------
Method: TCarbonTabsControl.SetPageIndex
Params: AIndex - New index
Params: AIndex - New page index
Changes the current Carbon page
------------------------------------------------------------------------------}