diff options
author | fvogel <fvogelnew1@free.fr> | 2022-02-26 14:38:37 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2022-02-26 14:38:37 (GMT) |
commit | 9da8f6aeed710b9e1bb3042f3d0a926bc9ddd65a (patch) | |
tree | 6c7bccc9232756df80315f80baf40444dd24de3a /win/tkWinClipboard.c | |
parent | bc28fdd255afe7ed5def861e1fd1ea7013f525b2 (diff) | |
download | tk-9da8f6aeed710b9e1bb3042f3d0a926bc9ddd65a.zip tk-9da8f6aeed710b9e1bb3042f3d0a926bc9ddd65a.tar.gz tk-9da8f6aeed710b9e1bb3042f3d0a926bc9ddd65a.tar.bz2 |
Fix [caaae89bd5]: Can't open clipboard in Windows 10 after Button-2 on Entry and Text.
Diffstat (limited to 'win/tkWinClipboard.c')
-rw-r--r-- | win/tkWinClipboard.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c index bcea1c1..840938d 100644 --- a/win/tkWinClipboard.c +++ b/win/tkWinClipboard.c @@ -55,16 +55,16 @@ TkSelGetSelection( Tcl_Encoding encoding; int result, locale, noBackslash = 0; + if ((selection != Tk_InternAtom(tkwin, "CLIPBOARD")) + || (target != XA_STRING)) { + goto error; + } if (!OpenClipboard(NULL)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "clipboard cannot be opened, another application grabbed it")); Tcl_SetErrorCode(interp, "TK", "CLIPBOARD", "BUSY", NULL); return TCL_ERROR; } - if ((selection != Tk_InternAtom(tkwin, "CLIPBOARD")) - || (target != XA_STRING)) { - goto error; - } /* * Attempt to get the data in Unicode form if available as this is less |