Fix visual glitchy on clicking on tab due to Document Peeker.

Closes #3367
This commit is contained in:
AngryGamer 2017-06-06 03:28:13 -07:00 committed by Don HO
parent b3be0b448b
commit 694fd80fa5

View File

@ -598,26 +598,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
if (_doDragNDrop)
{
// ::DragDetect does not work with TCS_BUTTONS
if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS)
{
_mightBeDragging = true;
}
else
{
_nSrcTab = _nTabDragged = currentTabOn;
POINT point;
point.x = LOWORD(lParam);
point.y = HIWORD(lParam);
::ClientToScreen(hwnd, &point);
if(::DragDetect(hwnd, point))
{
// Yes, we're beginning to drag, so capture the mouse...
_isDragging = true;
::SetCapture(hwnd);
}
}
_mightBeDragging = true;
}
notify(NM_CLICK, currentTabOn);
@ -658,6 +639,12 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
_nSrcTab = _nTabDragged = tabFocused;
_isDragging = true;
// ::SetCapture is required for normal non-TLS_BUTTONS.
if (!(::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS))
{
::SetCapture(hwnd);
}
}
}