Fix visual glitchy on clicking on tab due to Document Peeker.
Closes #3367
This commit is contained in:
parent
b3be0b448b
commit
694fd80fa5
|
@ -597,28 +597,9 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (_doDragNDrop)
|
if (_doDragNDrop)
|
||||||
{
|
|
||||||
// ::DragDetect does not work with TCS_BUTTONS
|
|
||||||
if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS)
|
|
||||||
{
|
{
|
||||||
_mightBeDragging = true;
|
_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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
notify(NM_CLICK, currentTabOn);
|
notify(NM_CLICK, currentTabOn);
|
||||||
|
|
||||||
|
@ -658,6 +639,12 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
|
||||||
|
|
||||||
_nSrcTab = _nTabDragged = tabFocused;
|
_nSrcTab = _nTabDragged = tabFocused;
|
||||||
_isDragging = true;
|
_isDragging = true;
|
||||||
|
|
||||||
|
// ::SetCapture is required for normal non-TLS_BUTTONS.
|
||||||
|
if (!(::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS))
|
||||||
|
{
|
||||||
|
::SetCapture(hwnd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue