Fix copy/cut/paste problems

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35931 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2013-01-03 21:55:12 +00:00
parent 25d6855dc0
commit ab3f590449

View file

@ -77,7 +77,7 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
+ (id) ownerByOsPb: (NSString*)p
{
if ([p isEqual: [NSPasteboard generalPasteboard]])
if ([p isEqual: [[NSPasteboard generalPasteboard] name]])
{
return wpb;
}
@ -397,12 +397,27 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
[wpb setClipboardData];
break;
case WM_RENDERALLFORMATS:
[wpb setClipboardData];
case WM_RENDERALLFORMATS:
if (!OpenClipboard(hwnd))
{
NSWarnMLog(@"Failed to get the Win32 clipboard. %d", GetLastError());
}
else if (GetClipboardOwner() == hwnd)
{
if (!EmptyClipboard())
{
NSWarnMLog(@"Failed to get the Win32 clipboard. %d", GetLastError());
}
else
{
SendMessage(hwnd, WM_RENDERFORMAT, CF_UNICODETEXT, 0);
CloseClipboard();
}
}
break;
default:
return DefWindowProc(hwnd, uMsg, wParam, lParam);
default:
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
return (LRESULT) NULL;