mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-11-02 04:24:28 +01:00
parent
161bb41425
commit
a92a9fd7c7
@ -4280,15 +4280,17 @@ void Notepad_plus::dropFiles(HDROP hdrop)
|
||||
if (hdrop)
|
||||
{
|
||||
// Determinate in which view the file(s) is (are) dropped
|
||||
POINT p;
|
||||
POINT p{};
|
||||
::DragQueryPoint(hdrop, &p);
|
||||
HWND hWin = ::ChildWindowFromPointEx(_pPublicInterface->getHSelf(), p, CWP_SKIPINVISIBLE);
|
||||
if (!hWin) return;
|
||||
|
||||
if ((_subEditView.getHSelf() == hWin) || (_subDocTab.getHSelf() == hWin) || currentView() == SUB_VIEW)
|
||||
switchEditViewTo(SUB_VIEW);
|
||||
else
|
||||
if ((_mainEditView.getHSelf() == hWin) || (_mainDocTab.getHSelf() == hWin))
|
||||
switchEditViewTo(MAIN_VIEW);
|
||||
else if ((_subEditView.getHSelf() == hWin) || (_subDocTab.getHSelf() == hWin))
|
||||
switchEditViewTo(SUB_VIEW);
|
||||
//else
|
||||
// do not change the current Notepad++ edit-view
|
||||
|
||||
int filesDropped = ::DragQueryFile(hdrop, 0xffffffff, NULL, 0);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user