On Mon, 26 May 2014 12:31:41 +0100
C Western <l...@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

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to