Recent

Author Topic: Debugging a MouseDown procedure disables moseclicks systemwide  (Read 423 times)

theorin

  • Newbie
  • Posts: 2
Debugging a MouseDown procedure disables moseclicks systemwide
« on: September 05, 2025, 12:39:53 pm »
I have encountered this problem after switching my project to QT5.
If I set a break-point in a mouse down procedure, the mouse click stops working when the program pauses at the break-point. If I stop the debug state, using keyboard shortcuts, everything returns to normal.

Interesting thing is, this behavior is not consistent across all components. For example break-point in MouseDown procedure of a TreeView works flawlessly, while similar break-point in Panel or TCustomControl breaks the mouse.

I have made a little project demonstrating this behavior.
I Use Almalinux 9, with KDE desktop.

I am curious why this happens and what can possibly be done to fix this behavior, other than switching the project to GTK2. This makes debugging work as expected, but switching every time my mouse hangs can be quite irritating. 

Many thanks for any possible help.

zeljko

  • Hero Member
  • *****
  • Posts: 1797
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Debugging a MouseDown procedure disables moseclicks systemwide
« Reply #1 on: September 05, 2025, 01:27:58 pm »
In all 3 examples mouse is locked (captured), so must use Alt + R -> Stop to stop debugger. Seem that actually mouse up does not trigger so clicked control holds capture (x11 grab).

zeljko

  • Hero Member
  • *****
  • Posts: 1797
    • http://wiki.lazarus.freepascal.org/User:Zeljan

theorin

  • Newbie
  • Posts: 2
Re: Debugging a MouseDown procedure disables moseclicks systemwide
« Reply #3 on: September 09, 2025, 12:30:13 pm »
Thank you for looking into this.
I have raised a new issue at the Lazarus GitLab, including the findings you posted earlier: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41821

I really hope it gets resolved.

 

TinyPortal © 2005-2018