So, I have a TMemo, and I created an onDblClick event for it. The event opens a modal dialog. Problem is that when the modal dialog closes, the TMemo still tracks the mouse as it was selecting text. That's quite annoying. I wonder if I'm missing something or there's a workaround.
To reproduce the problem, just create a new project, add a TMemo to the form and set its double click event to this:
PROCEDURE TForm1.Memo1DblClick (Sender: TObject);
BEGIN
MessageDlg ('Info', 'This will be weird!', mtInformation, [mbIgnore], 0)
END;
Now, if you doubleclick the memo, you'll see the message dialog, and after closing move the mouse over the memo without clicking. You'll see you're selecting the text!
The glitch works on Linux + GTK (Fedora).