From 2d46e4877bac37abac18ee21878836727a15331d Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 24 Feb 2012 17:06:25 +0000 Subject: Revert "Empty Windows clipboard when X loses focus" This reverts commit ab1652e62eaad26169a290f0f233091588b307d8. --- hw/xwin/win.h | 3 --- hw/xwin/winclipboard.h | 1 - hw/xwin/winclipboardinit.c | 7 ------- hw/xwin/winclipboardwndproc.c | 26 -------------------------- hw/xwin/winwndproc.c | 6 ------ 5 files changed, 43 deletions(-) diff --git a/hw/xwin/win.h b/hw/xwin/win.h index f2b76ebb6..b0ce366b5 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -825,9 +825,6 @@ winInitClipboard (void); void winFixClipboardChain (void); - -void -winUpdateClipboard (void); #endif diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h index c51988bb9..6f1616359 100644 --- a/hw/xwin/winclipboard.h +++ b/hw/xwin/winclipboard.h @@ -74,7 +74,6 @@ #define WIN_CLIPBOARD_DELAY 1 #define WM_WM_REINIT (WM_USER + 1) -#define WM_WM_DEINIT (WM_USER + 2) /* * References to external symbols diff --git a/hw/xwin/winclipboardinit.c b/hw/xwin/winclipboardinit.c index da8a9b753..1cbc27a2b 100644 --- a/hw/xwin/winclipboardinit.c +++ b/hw/xwin/winclipboardinit.c @@ -143,10 +143,3 @@ winFixClipboardChain (void) PostMessage (g_hwndClipboard, WM_WM_REINIT, 0, 0); } } - -void -winUpdateClipboard (void) -{ - if (g_fClipboard && g_hwndClipboard) - PostMessage (g_hwndClipboard, WM_WM_DEINIT, 0, 0); -} diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c index 40bdaa978..02347ff43 100755 --- a/hw/xwin/winclipboardwndproc.c +++ b/hw/xwin/winclipboardwndproc.c @@ -246,32 +246,6 @@ winClipboardWindowProc (HWND hwnd, UINT message, winDebug ("winClipboardWindowProc - WM_WM_REINIT: Exit\n"); return 0; - case WM_WM_DEINIT: - { - /* - Assume the user has changed the selection since we gained - focus, so empty the Windows clipboard, to tell Windows that - it needs to ask us to render the contents again if anyone asks - for it - */ - - /* Set up for another delayed rendering callback */ - OpenClipboard (hwnd); - - /* Take ownership of the Windows clipboard */ - EmptyClipboard (); - - /* Advertise Unicode if we support it */ - if (g_fUnicodeSupport) - SetClipboardData (CF_UNICODETEXT, NULL); - - /* Always advertise regular text */ - SetClipboardData (CF_TEXT, NULL); - - /* Release the clipboard */ - CloseClipboard (); - } - return 0; case WM_DRAWCLIPBOARD: { diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index 23d5454b0..e99697de8 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -1217,12 +1217,6 @@ winWindowProc (HWND hwnd, UINT message, #ifdef XWIN_CLIPBOARD /* Make sure the clipboard chain is ok. */ winFixClipboardChain (); - - if (!wParam) - { - /* Make sure clipboard is updated if needed */ - winUpdateClipboard (); - } #endif /* Call engine specific screen activation/deactivation function */ -- cgit v1.2.3