Issue with clipboard in Windows



I've implemented custom clipboard handling in my program that allows me to push to clipboard more than one clipboard format in parallel (plain text format plus "text/html" plus "HTML Format" on windows etc).

My issue is that from time to time I get report from users that they can not paste plain text into some text editor, and when they check the clipboard contents it is indeed the case that only HTML formats are present at the time (although the code always tries to push at least plain text format). The issue appears randomly, I myself have managed to reproduce it only once a long time ago.

The logs always show the following issue:
16:37:02.616 GTK [16]: gdkproperty-win32.c:200: OpenClipboard failed: Access is denied. 16:37:02.626 GTK [8]: inner_clipboard_window_procedure: assertion `success' failed

I've attached the example of the code quite similar to what I use.
It appears as if something is locking the clipboard, but not everything, HTML always seems to pass through.

Additionally, the code to block the default signal handler (g_signal_stop_emission_by_name part) seems to cause crash in my bigger program so I commented it in there.

Can anyone spot the possible issue in my code?

I am using GTK 2.24.10 for Windows here (from www.gtk.org). Compiler is Visual Studio 2008.
Does anyone know of any relevant fixes in the newer GTK in this regards.

Also any tips on what GTK 2.24.x build for Windows you use are welcome.

TIA,
  Miroslav

Attachment: main.cpp
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]