diff options
author | fvogel <fvogelnew1@free.fr> | 2017-06-05 18:32:24 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-06-05 18:32:24 (GMT) |
commit | fbac4859a673c9a5f0c8936ed8d18ea9e9145304 (patch) | |
tree | 4e184d638205d9ce2ef854ebea9393e5d8d91bd3 /win/tkWinX.c | |
parent | 452ee6a6849e04a6a94bc7488e935129614041f8 (diff) | |
parent | fd3fd3d844d9ff5f83c3fd26ee88f2c02892c180 (diff) | |
download | tk-fbac4859a673c9a5f0c8936ed8d18ea9e9145304.zip tk-fbac4859a673c9a5f0c8936ed8d18ea9e9145304.tar.gz tk-fbac4859a673c9a5f0c8936ed8d18ea9e9145304.tar.bz2 |
merge trunk
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index d41b6c1..6293ce7 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -676,19 +676,6 @@ TkClipCleanup( TkDisplay *dispPtr) /* Display associated with clipboard. */ { if (dispPtr->clipWindow != NULL) { - /* - * Force the clipboard to be rendered if we are the clipboard owner. - */ - - HWND hwnd = Tk_GetHWND(Tk_WindowId(dispPtr->clipWindow)); - - if (GetClipboardOwner() == hwnd) { - OpenClipboard(hwnd); - EmptyClipboard(); - TkWinClipboardRender(dispPtr, CF_TEXT); - CloseClipboard(); - } - Tk_DeleteSelHandler(dispPtr->clipWindow, dispPtr->clipboardAtom, dispPtr->applicationAtom); Tk_DeleteSelHandler(dispPtr->clipWindow, dispPtr->clipboardAtom, @@ -865,6 +852,23 @@ Tk_TranslateWinEvent( return 1; } + case WM_RENDERALLFORMATS: { + TkWindow *winPtr = (TkWindow *) Tk_HWNDToWindow(hwnd); + + if (winPtr && OpenClipboard(hwnd)) { + /* + * Make sure that nobody had taken ownership of the clipboard + * before we opened it. + */ + + if (GetClipboardOwner() == hwnd) { + TkWinClipboardRender(winPtr->dispPtr, CF_TEXT); + } + CloseClipboard(); + } + return 1; + } + case WM_COMMAND: case WM_NOTIFY: case WM_VSCROLL: |