mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 14:33:49 +02:00
cocoa: resolve the issue with mouse events not processed by TabControl
git-svn-id: trunk@58645 -
This commit is contained in:
parent
0e60e21aa7
commit
71fdf9349f
lcl/interfaces/cocoa
@ -471,16 +471,24 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCocoaTabControl.mouseDown(event: NSEvent);
|
||||
var
|
||||
res : Boolean;
|
||||
begin
|
||||
if not Assigned(callback) then callback.MouseUpDownEvent(event);
|
||||
// do not block?
|
||||
inherited mouseDown(event);
|
||||
res := callback.MouseUpDownEvent(event, false, true);
|
||||
if not Assigned(callback) or not res then
|
||||
begin
|
||||
inherited mouseDown(event);
|
||||
|
||||
if Assigned(callback) then
|
||||
begin
|
||||
callback.MouseUpDownEvent(event, True);
|
||||
end;
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TCocoaTabControl.mouseUp(event: NSEvent);
|
||||
begin
|
||||
if not Assigned(callback) then callback.MouseUpDownEvent(event);
|
||||
// do not block?
|
||||
inherited mouseUp(event);
|
||||
end;
|
||||
|
||||
|
@ -507,6 +507,7 @@ begin
|
||||
lControl := TCocoaTabControl.alloc.lclInitWithCreateParams(AParams);
|
||||
lTabStyle := LCLTabPosToNSTabStyle(lTabControl.ShowTabs, lTabControl.BorderWidth, lTabControl.TabPosition);
|
||||
lControl.setTabViewType(lTabStyle);
|
||||
lControl.lclEnabled := AWinControl.Enabled;
|
||||
Result := TLCLIntfHandle(lControl);
|
||||
if Result <> 0 then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user