From 801f392c8d16cb4b883270e30f40f9990bf170c3 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Sat, 18 Jun 2016 07:47:05 +0000 Subject: [PATCH] cocoa: Fixes TButton clicking git-svn-id: trunk@52517 - --- lcl/interfaces/cocoa/cocoaprivate.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/cocoa/cocoaprivate.pp b/lcl/interfaces/cocoa/cocoaprivate.pp index 9d663dc5c0..f0639fd1d3 100644 --- a/lcl/interfaces/cocoa/cocoaprivate.pp +++ b/lcl/interfaces/cocoa/cocoaprivate.pp @@ -1768,8 +1768,10 @@ end; procedure TCocoaButton.mouseDown(event: NSEvent); begin - if not callback.MouseUpDownEvent(event) then - inherited mouseDown(event); + callback.MouseUpDownEvent(event); + // We need to call the inherited regardless of the result of the call to + // MouseUpDownEvent otherwise mouse clicks don't work, see bug 30131 + inherited mouseDown(event); end; procedure TCocoaButton.mouseDragged(event: NSEvent);