[Lazarus] Clipboard.HasFormat(CF_TEXT)
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon May 26 15:38:42 CEST 2014
On Mon, 26 May 2014 12:31:41 +0100
C Western <l at c-m-w.me.uk> wrote:
> I may have discovered an issue with the clipboard on Linux/GTK2. My
> application updates a paste button and menu item via an action that
> updates on idle by calling Clipboard.HasFormat(CF_TEXT). Pasting is
> intermittently failing/hanging for 10 seconds, and I think the issue is
> that the Clipboard.HasFormat routine is reentered. Clipboard.HasFormat
> can call Application.ProcessMessages, and a possible failure path seems
> to be that a Ctrl+V arrives during this call of ProcessMessages, and in
> handling this Clipboard.HasFormat is called, and the routine seems to
> have nothing to protect against reentry.
>
> Two Ctrl+V's in quick succession could potentially trigger then same
> issue, if the clipboard contents are large.
>
> Have I misunderstood something? I couldn't see anything in the bug
> tracker about this, though there is a reported issue about large pastes.
> I can't see any obvious fix at the application level other than leaving
> the paste items permanently enabled.
>
> I think this is not an issue in MS Windows as I don't think the
> clipboard requires communication with another process.
Can you create a small example?
Mattias
More information about the Lazarus
mailing list