Fix Tab non-responding after dragging bug

Short problem description:
Drag/drop a tab with the mouse to another position,
then all other tabs can't be activated with clicking anymore.

Also a missing include was added, that prevented compilation

Fix #4885, close #4886
This commit is contained in:
Wurstbrot 2018-09-27 23:15:57 +02:00 committed by Don HO
parent 40192bda0c
commit c6e1a95098
2 changed files with 2 additions and 3 deletions

View File

@ -31,6 +31,7 @@
#include <uxtheme.h> #include <uxtheme.h>
#include <cassert> #include <cassert>
#include <codecvt> #include <codecvt>
#include <locale>
#include "StaticDialog.h" #include "StaticDialog.h"

View File

@ -669,6 +669,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
if (_isDragging) if (_isDragging)
{ {
exchangeItemData(p); exchangeItemData(p);
::CallWindowProc(_tabBarDefaultProc, hwnd, WM_LBUTTONDOWN, wParam, lParam);
// Get cursor position of "Screen" // Get cursor position of "Screen"
// For using the function "WindowFromPoint" afterward!!! // For using the function "WindowFromPoint" afterward!!!
@ -1187,9 +1188,6 @@ void TabBarPlus::exchangeTabItemData(int oldTab, int newTab)
// Tell Notepad_plus to notifiy plugins that a D&D operation was done (so doc index has been changed) // Tell Notepad_plus to notifiy plugins that a D&D operation was done (so doc index has been changed)
::SendMessage(_hParent, NPPM_INTERNAL_DOCORDERCHANGED, 0, oldTab); ::SendMessage(_hParent, NPPM_INTERNAL_DOCORDERCHANGED, 0, oldTab);
//2. set to focus
setActiveTab(newTab);
} }
void TabBarPlus::exchangeItemData(POINT point) void TabBarPlus::exchangeItemData(POINT point)