mirror of
https://github.com/reactos/reactos.git
synced 2025-04-06 05:34:22 +00:00
[SHELL32] Fix Shift-Delete to Permanently Delete Files and Folders (#4004)
CORE-17802
This commit is contained in:
parent
212cbb6fff
commit
cc0e2a3672
2 changed files with 4 additions and 5 deletions
|
@ -779,7 +779,8 @@ HRESULT CDefaultContextMenu::DoDelete(LPCMINVOKECOMMANDINFO lpcmi)
|
|||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
SHSimulateDrop(pDT, m_pDataObj, 0, NULL, NULL);
|
||||
DWORD grfKeyState = (lpcmi->fMask & CMIC_MASK_SHIFT_DOWN) ? MK_SHIFT : 0;
|
||||
SHSimulateDrop(pDT, m_pDataObj, grfKeyState, NULL, NULL);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -140,12 +140,10 @@ class CRecyclerDropTarget :
|
|||
}
|
||||
|
||||
HRESULT WINAPI Drop(IDataObject *pDataObject,
|
||||
DWORD dwKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
TRACE("(%p) object dropped on recycle bin, effect %u\n", this, *pdwEffect);
|
||||
|
||||
/* TODO: pdwEffect should be read and make the drop object be permanently deleted in the move case (shift held) */
|
||||
|
||||
FORMATETC fmt;
|
||||
TRACE("(%p)->(DataObject=%p)\n", this, pDataObject);
|
||||
InitFormatEtc (fmt, cfShellIDList, TYMED_HGLOBAL);
|
||||
|
@ -155,7 +153,7 @@ class CRecyclerDropTarget :
|
|||
{
|
||||
DWORD fMask = 0;
|
||||
|
||||
if ((dwKeyState & MK_SHIFT) == MK_SHIFT)
|
||||
if ((grfKeyState & MK_SHIFT) == MK_SHIFT)
|
||||
fMask |= CMIC_MASK_SHIFT_DOWN;
|
||||
|
||||
_DoDeleteAsync(pDataObject, fMask);
|
||||
|
|
Loading…
Reference in a new issue