From 885a085db5db6b061591d87a4f3f89ce0371569d Mon Sep 17 00:00:00 2001 From: jesus Date: Sat, 18 Oct 2014 23:18:48 +0000 Subject: [PATCH] LCL, fix grids mouse selecting at cells borders on grids with always show editor option, last part of issue #22542 git-svn-id: trunk@46601 - --- lcl/interfaces/carbon/carbonproc.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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;