Clipboard Stops Working
- From: <martyn 2 russell bt com>
- To: <gtk-devel-list gnome org>
- Cc: <laurie booton bt com>
- Subject: Clipboard Stops Working
- Date: Mon, 3 Nov 2003 15:27:44 -0000
Tor,
I've noticed on Windows that the clipboard fails to operate correctly (in Windows applications like Word) AND my GTK application in this scenario:
- Copy text (all is fine - it can be pasted)
- Copy an image.
- Copy text (unable to paste from here on)
In my GTK app, I am using:
clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
if(gtk_clipboard_wait_is_text_available(clipboard) == TRUE)
clipboard_text = gtk_clipboard_wait_for_text(clipboard);
I wrote a quick test app using the Win32 API and it works fine in every case (here is part of the src):
HWND hwnd = get_hwnd();
HGLOBAL hglb;
LPSTR lpstr;
char *text = NULL;
if(!OpenClipboard(hwnd))
{
fprintf(stdout, "could not open clipboard\n");
return NULL;
}
hglb = GetClipboardData(CF_TEXT);
lpstr = GlobalLock(hglb);
text = strdup(lpstr);
GlobalUnlock(hglb);
CloseClipboard();
Is this related to this bug?
http://bugzilla.gnome.org/show_bug.cgi?id=104944
If not (and it is a bug), I will report a new bug. Also, would you like the test program (full src) attached to the bug?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]