mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-31 01:11:00 +00:00
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:
parent
25d6855dc0
commit
ab3f590449
1 changed files with 20 additions and 5 deletions
|
@ -77,7 +77,7 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
||||||
|
|
||||||
+ (id) ownerByOsPb: (NSString*)p
|
+ (id) ownerByOsPb: (NSString*)p
|
||||||
{
|
{
|
||||||
if ([p isEqual: [NSPasteboard generalPasteboard]])
|
if ([p isEqual: [[NSPasteboard generalPasteboard] name]])
|
||||||
{
|
{
|
||||||
return wpb;
|
return wpb;
|
||||||
}
|
}
|
||||||
|
@ -397,12 +397,27 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
||||||
[wpb setClipboardData];
|
[wpb setClipboardData];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_RENDERALLFORMATS:
|
case WM_RENDERALLFORMATS:
|
||||||
[wpb setClipboardData];
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (LRESULT) NULL;
|
return (LRESULT) NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue