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