Tk Source Code

Artifact [84f4c211]
Login

Artifact 84f4c2119f80167928c9f980c5bf36800a4e4482:

Attachment "clipboardPatch.txt" to ticket [939389ff] added by yamako 2004-04-21 23:01:06.
*** tkWinX.c.orig	Sat Dec 07 16:46:52 2002
--- tkWinX.c	Wed Apr 21 21:00:48 2004
***************
*** 548,554 ****
      TkDisplay *dispPtr;
  {
      Display *display = dispPtr->display;
-     HWND hwnd;
      ThreadSpecificData *tsdPtr = (ThreadSpecificData *) 
  	    Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
  
--- 548,553 ----
***************
*** 561,575 ****
       * Force the clipboard to be rendered if we are the clipboard owner.
       */
      
!     if (dispPtr->clipWindow) {
! 	hwnd = Tk_GetHWND(Tk_WindowId(dispPtr->clipWindow));
! 	if (GetClipboardOwner() == hwnd) {
! 	    OpenClipboard(hwnd);
  	    EmptyClipboard();
  	    TkWinClipboardRender(dispPtr, CF_TEXT);
  	    CloseClipboard();
  	}
-     }
  
      tsdPtr->winDisplay = NULL;
  
--- 560,571 ----
       * Force the clipboard to be rendered if we are the clipboard owner.
       */
      
! 	if (dispPtr->clipboardActive) {
! 	    OpenClipboard(NULL);
  	    EmptyClipboard();
  	    TkWinClipboardRender(dispPtr, CF_TEXT);
  	    CloseClipboard();
  	}
  
      tsdPtr->winDisplay = NULL;