cocoa: OpenGL control events were blocked because it thought the control was disabled

git-svn-id: trunk@49792 -
This commit is contained in:
sekelsenmat 2015-09-09 07:33:08 +00:00
parent 5db4341940
commit 0da4587e23

View File

@ -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