diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-18 12:49:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-18 12:49:22 (GMT) |
commit | ab07fb7b82416869d53682c29fc475cbdf476f22 (patch) | |
tree | 97cfe24dca407c9944c7cd9e1ae6f6835c011803 /win | |
parent | a6ffdbb7fddb58a17753459ab04a20d3f0ae7a2a (diff) | |
parent | 107e2400ee9876bbfd0b4712307f642290498194 (diff) | |
download | tk-ab07fb7b82416869d53682c29fc475cbdf476f22.zip tk-ab07fb7b82416869d53682c29fc475cbdf476f22.tar.gz tk-ab07fb7b82416869d53682c29fc475cbdf476f22.tar.bz2 |
merge core-8-6-branch
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinDialog.c | 2 | ||||
-rw-r--r-- | win/tkWinX.c | 30 |
2 files changed, 18 insertions, 14 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 635b9a3..f9a7cfd 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -2808,7 +2808,7 @@ Tk_MessageBoxObjCmd( ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); Tcl_DString titleBuf, tmpBuf; - WCHAR *titlePtr, *tmpPtr; + const WCHAR *titlePtr, *tmpPtr; const char *src; defaultBtn = -1; 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: |