From: Thomas Faber Date: Thu, 15 Jun 2017 12:16:09 +0000 (+0000) Subject: [WIN32K:NTUSER] X-Git-Tag: ReactOS-0.4.6~306 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=3dda28e8fb79d1d75bb90f71057c98deea3ad87a [WIN32K:NTUSER] - Fix clipboard lock check in UserSetClipboardData. Fixes 24 user32:clipboard tests. CORE-13414 #resolve svn path=/trunk/; revision=75045 --- diff --git a/reactos/win32ss/user/ntuser/clipboard.c b/reactos/win32ss/user/ntuser/clipboard.c index 672631ca346..c29a1c3c3d3 100644 --- a/reactos/win32ss/user/ntuser/clipboard.c +++ b/reactos/win32ss/user/ntuser/clipboard.c @@ -987,16 +987,7 @@ UserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA scd) if (!pWinStaObj) goto cleanup; - /* - * Check if the clipboard is correctly opened: - * - in case of normal rendering, we must have opened the clipboard; - * - in case of delayed rendering, the clipboard must be already opened - * by another application, but we need to be the clipboard owner. - */ - if (!fmt || - (!pWinStaObj->fInDelayedRendering && !IntIsClipboardOpenByMe(pWinStaObj)) || - (pWinStaObj->fInDelayedRendering && !(pWinStaObj->ptiClipLock && - pWinStaObj->spwndClipOwner->head.pti == PsGetCurrentThreadWin32Thread()))) + if (!fmt || !pWinStaObj->ptiClipLock) { ERR("Access denied!\n"); EngSetLastError(ERROR_CLIPBOARD_NOT_OPEN);