mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 01:17:29 +01:00
cocoa: OpenGL control events were blocked because it thought the control was disabled
git-svn-id: trunk@49792 -
This commit is contained in:
parent
5db4341940
commit
0da4587e23
@ -63,7 +63,7 @@ type
|
||||
TCocoaOpenGLView = objcclass(NSOpenGLView)
|
||||
public
|
||||
Owner: TWinControl;
|
||||
callback: ICommonCallback;
|
||||
callback: TLCLCommonCallback;
|
||||
function acceptsFirstResponder: Boolean; override;
|
||||
function becomeFirstResponder: Boolean; override;
|
||||
function resignFirstResponder: Boolean; override;
|
||||
@ -72,6 +72,7 @@ type
|
||||
function lclGetCallback: ICommonCallback; override;
|
||||
procedure lclClearCallback; override;
|
||||
function lclIsHandle: Boolean; override;
|
||||
function lclIsEnabled: Boolean; override;
|
||||
// mouse
|
||||
procedure mouseDown(event: NSEvent); override;
|
||||
procedure mouseUp(event: NSEvent); override;
|
||||
@ -391,6 +392,11 @@ begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function TCocoaOpenGLView.lclIsEnabled: Boolean;
|
||||
begin
|
||||
Result := Owner.Enabled;
|
||||
end;
|
||||
|
||||
procedure TCocoaOpenGLView.mouseDown(event: NSEvent);
|
||||
begin
|
||||
if not Assigned(callback) or not callback.MouseUpDownEvent(event) then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user