diff --git a/lcl/interfaces/carbon/carbonproc.pp b/lcl/interfaces/carbon/carbonproc.pp index 6c981b45b4..5123e1f8c7 100644 --- a/lcl/interfaces/carbon/carbonproc.pp +++ b/lcl/interfaces/carbon/carbonproc.pp @@ -1308,6 +1308,15 @@ begin kEventControlSetFocusPart: Result := CallNextEventHandler(ANextHandler, AEvent); kEventControlHitTest: begin + Result := CallNextEventHandler(ANextHandler, AEvent); + { + // I was not able to find what for is this workaround (r11394) + // returning kControlEditTextPart for any customcontrol looks strange + // It seems to interfer with what widget really hit the mouse click. + // + // But it breaks grid's mouse selecting when clicking (near) at + // the borders of cells on an always show editor grid. + // {$IFDEF VerboseMouse} DebugLn('CustomControlHandler HitTest'); {$ENDIF} @@ -1317,6 +1326,7 @@ begin Result := SetEventParameter(AEvent, kEventParamControlPart, typeControlPartCode, SizeOf(Part), @Part); OSError(Result, SName, SSetEvent); + } end; end; kEventClassTextInput: Result := noErr;