diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2015-12-31 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:58 +0300 |
commit | 9608215ad8deb58355bae27692669fda067c4f43 (patch) | |
tree | 1227131a3f19bc36e5da4ba11791154d05cc08af /CPP/7zip/UI/FileManager/PanelDrag.cpp | |
parent | 5de23c1deb52b8be4c43ad9f694c64bbddd0c38a (diff) |
15.1315.13
Diffstat (limited to 'CPP/7zip/UI/FileManager/PanelDrag.cpp')
-rw-r--r-- | CPP/7zip/UI/FileManager/PanelDrag.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/CPP/7zip/UI/FileManager/PanelDrag.cpp b/CPP/7zip/UI/FileManager/PanelDrag.cpp index e20ddd63..0cd08d4c 100644 --- a/CPP/7zip/UI/FileManager/PanelDrag.cpp +++ b/CPP/7zip/UI/FileManager/PanelDrag.cpp @@ -209,7 +209,23 @@ STDMETHODIMP CDropSource::QueryContinueDrag(BOOL escapePressed, DWORD keyState) { CCopyToOptions options; options.folder = Folder; + + // 15.13: fixed problem with mouse cursor for password window. + // DoDragDrop() probably calls SetCapture() to some hidden window. + // But it's problem, if we show some modal window, like MessageBox. + // So we return capture to our window. + // If you know better way to solve the problem, please notify 7-Zip developer. + + // MessageBoxW(*Panel, L"test", L"test", 0); + + /* HWND oldHwnd = */ SetCapture(*Panel); + Result = Panel->CopyTo(options, Indices, &Messages); + + // do we need to restore capture? + // ReleaseCapture(); + // oldHwnd = SetCapture(oldHwnd); + if (Result != S_OK || !Messages.IsEmpty()) return DRAGDROP_S_CANCEL; } @@ -357,10 +373,14 @@ void CPanel::OnDrag(LPNMLISTVIEW /* nmListView */) effectsOK |= DROPEFFECT_MOVE; DWORD effect; _panelCallback->DragBegin(); + HRESULT res = DoDragDrop(dataObject, dropSource, effectsOK, &effect); + _panelCallback->DragEnd(); bool canceled = (res == DRAGDROP_S_CANCEL); + CDisableNotify disableNotify(*this); + if (res == DRAGDROP_S_DROP) { res = dropSourceSpec->Result; |