summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-05-15 19:28:18 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-05-15 19:28:18 (GMT)
commit56f4a0d0fc8d1566198a423a888e16aa5336c08e (patch)
tree66711ade7a9949b2d92dc4d5194449c5e2ee10e6 /win
parent5933c912e0ca328f932a7570535db8530736a88a (diff)
parentc257b74035bb102d5860b77c9484c8e7e5ee833c (diff)
downloadtk-56f4a0d0fc8d1566198a423a888e16aa5336c08e.zip
tk-56f4a0d0fc8d1566198a423a888e16aa5336c08e.tar.gz
tk-56f4a0d0fc8d1566198a423a888e16aa5336c08e.tar.bz2
merge 8.6
Diffstat (limited to 'win')
-rw-r--r--win/tkWinSend.c1
-rw-r--r--win/tkWinX.c30
2 files changed, 17 insertions, 14 deletions
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index c999c0b..fca8561 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -619,7 +619,6 @@ BuildMoniker(
LPMONIKER pmkItem = NULL;
Tcl_DString dString;
- Tcl_DStringInit(&dString);
Tcl_WinUtfToTChar(name, -1, &dString);
hr = CreateFileMoniker((LPOLESTR)Tcl_DStringValue(&dString), &pmkItem);
Tcl_DStringFree(&dString);
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 098fc6d..fca72c3 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -686,19 +686,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,
@@ -875,6 +862,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: