mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 03:21:24 +02:00
LCL carbon: applied patch #0011070: Two fixes for Carbon Tabs from Tobias Giesen
git-svn-id: trunk@14733 -
This commit is contained in:
parent
3880c2d0cd
commit
ae57a5e457
@ -28,6 +28,7 @@ function CarbonControl_Hit(ANextHandler: EventHandlerCallRef;
|
|||||||
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
||||||
var
|
var
|
||||||
ControlPart: ControlPartCode;
|
ControlPart: ControlPartCode;
|
||||||
|
LCLTarget: TWinControl;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseControlEvent}
|
{$IFDEF VerboseControlEvent}
|
||||||
DebugLn('CarbonControl_Hit: ', DbgSName(AWidget.LCLObject));
|
DebugLn('CarbonControl_Hit: ', DbgSName(AWidget.LCLObject));
|
||||||
@ -40,10 +41,12 @@ begin
|
|||||||
SizeOf(ControlPartCode), nil, @ControlPart), 'CarbonControl_Hit', SGetEvent,
|
SizeOf(ControlPartCode), nil, @ControlPart), 'CarbonControl_Hit', SGetEvent,
|
||||||
SControlPart) then Exit;
|
SControlPart) then Exit;
|
||||||
|
|
||||||
|
// save LCL target now as the widget might be removed within hit
|
||||||
|
LCLTarget := AWidget.LCLObject;
|
||||||
(AWidget as TCarbonControl).Hit(ControlPart);
|
(AWidget as TCarbonControl).Hit(ControlPart);
|
||||||
|
|
||||||
// send postponed mouse up event
|
// send postponed mouse up event
|
||||||
DeliverMessage(AWidget.LCLObject, SavedMouseUpMsg);
|
DeliverMessage(LCLTarget, SavedMouseUpMsg);
|
||||||
|
|
||||||
NotifyApplicationUserInput(SavedMouseUpMsg.Msg);
|
NotifyApplicationUserInput(SavedMouseUpMsg.Msg);
|
||||||
CarbonWidgetSet.SetCaptureWidget(0); // capture is released
|
CarbonWidgetSet.SetCaptureWidget(0); // capture is released
|
||||||
|
@ -684,7 +684,7 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetPageIndex(Index);
|
SetPageIndex(PIndex); // we must use page index!
|
||||||
|
|
||||||
// send change
|
// send change
|
||||||
FillChar(Msg, SizeOf(TLMNotify), 0);
|
FillChar(Msg, SizeOf(TLMNotify), 0);
|
||||||
@ -845,7 +845,7 @@ end;
|
|||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCarbonTabsControl.SetPageIndex
|
Method: TCarbonTabsControl.SetPageIndex
|
||||||
Params: AIndex - New index
|
Params: AIndex - New page index
|
||||||
|
|
||||||
Changes the current Carbon page
|
Changes the current Carbon page
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
|
Loading…
Reference in New Issue
Block a user