Recent

Author Topic: Loosing mouse clicks when running program on macOS  (Read 1956 times)

Wilko500

  • Full Member
  • ***
  • Posts: 112
Loosing mouse clicks when running program on macOS
« on: July 21, 2024, 11:36:55 pm »
This "fault" has been lurking for a while now.  I feel uncertain that it actually IS a real problem but it does occur at random and I cannot identify circumstances that will reproduce it to order.  On my main form I have a number of command buttons.

Seemingly at random when I click on these buttons momentarily the colour flashes pale grey then back to the off white but the programmed action does not occur.  A second or third click is often required to get the programmed action.

I am running on a MacBook Pro (mid 2015), Monterey 12.7.5, Lazarus 3.4 FPC 3.2.2 with an external wireless mouse.

Tests I have done so far:
Several combinations of Lazarus and FPC - issue occurs on all
Different mouse including new one, wireless, bluetooth and inbuilt track pad - issue occurs on all
Placed debug messages in the on-click event - confirms that event is not fired/actioned in spite of the button colour flashing
I think, but cannot be certain without further testing, that this also occurs on my iMac

While this is not a show stopper it in intensely irritating.  I seek wisdom and advice that can help me understand and/or fix this issue.

MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

Sod Almighty

  • Newbie
  • Posts: 2
Re: Losing mouse clicks when running program on macOS
« Reply #1 on: July 26, 2024, 07:06:01 pm »
I'm getting this problem too. It happens if the mouse moves slightly during the click, and it affects the IDE itself as well as programs written in it. It definitely happens with buttons and checkboxes, but probably also other controls.

I assumed it had something to do with the "drag and drop" functionality controls can have. But perhaps it's a bug?

Either way it's very annoying. No other application on my Mac behaves in this way.
« Last Edit: July 26, 2024, 07:07:48 pm by Sod Almighty »

rossh_lz

  • New Member
  • *
  • Posts: 26
Re: Loosing mouse clicks when running program on macOS
« Reply #2 on: August 06, 2024, 03:22:54 pm »
Same here.  v3.4.   I think the issue is that the mouse moved a pixel or more between the down and up, which seems to cancel the click, and turn it into a drag.

Try it.  Be super careful not to move the mouse, and the click succeeds.  But do a normal fluid click and its ignored and turned into something else.

It seems the drag threshold has been reduced to nothing or takes priority.  In any case... its all broken

Sod Almighty

  • Newbie
  • Posts: 2
Re: Losing mouse clicks when running program on macOS
« Reply #3 on: August 06, 2024, 04:22:29 pm »
Yes, that is exactly what seems to be happening.

Developers, do you plan to fix this?

Wilko500

  • Full Member
  • ***
  • Posts: 112
Re: Loosing mouse clicks when running program on macOS
« Reply #4 on: September 09, 2024, 12:51:41 pm »
While trying to debug my memory leak issue I installed many co binational of FPC and Lazarus, al done with FPCUPdeluxe.  Thus I  was testing the same project code with multiple FPC/Laz combinations.  I was totally focussed on the memory leak and had not noticed that the "loosing click" behaviour had gone.  That was until I happened to go back to an earlier version pop Lazarus and the "loosing clicks" came back with a vengeance. 

It seems likely that the problem was indeed related to Laz 3.2.2??  I wonder if anyone else who had observed this behaviour has noticed it in a later Lazarus versions. Currently I am using Laz 3.9.9 and Laz 3.5 (using FPCUPDeluxe with fixes branch).   
MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

 

TinyPortal © 2005-2018