From c5dc28ec2272a865ef2f28fd7ab151b55517fedf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 26 Sep 2022 19:16:12 +0300 Subject: more clipboard shit removed --- plugins/Popup/src/popup_wnd2.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'plugins/Popup/src') diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index ded818c45f..57f77f0121 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -952,19 +952,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case ACT_DEF_COPY: if (m_lptzText || m_lptzTitle) { - CMStringW tszText(FORMAT, L"%s\n\n%s", - (m_lptzTitle) ? m_lptzTitle : L"", - (m_lptzText) ? m_lptzText : L""); - - if (OpenClipboard(m_hwnd)) { - EmptyClipboard(); - HGLOBAL clipbuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, (tszText.GetLength() + 1) * sizeof(wchar_t)); - wchar_t *buffer = (wchar_t *)GlobalLock(clipbuffer); - mir_wstrcpy(buffer, tszText); - GlobalUnlock(clipbuffer); - SetClipboardData(CF_UNICODETEXT, clipbuffer); - CloseClipboard(); - } + CMStringW tszText(FORMAT, L"%s\n\n%s", (m_lptzTitle) ? m_lptzTitle : L"", (m_lptzText) ? m_lptzText : L""); + Utils_ClipboardCopy(tszText); } PUDeletePopup(m_hwnd); break; -- cgit v1.2.3