mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
Revert "Revert 'Fix multi-line tab button stay pushed issue while swiching off.'"
The commit fce74dd894a33bc169d0be75b789a0606aae8474 (which reverts 8342da3) does not solve dragging tab problem(#7509), and it made a regression (#3545 is reproduced again). This reverts commit fce74dd894a33bc169d0be75b789a0606aae8474.
This commit is contained in:
parent
f8cf4f3885
commit
b5322b1043
@ -152,7 +152,16 @@ void TabBar::setFont(const TCHAR *fontName, int fontSize)
|
||||
void TabBar::activateAt(int index) const
|
||||
{
|
||||
if (getCurrentTabIndex() != index)
|
||||
{
|
||||
// TCM_SETCURFOCUS is busted on WINE/ReactOS for single line (non-TCS_BUTTONS) tabs...
|
||||
// We need it on Windows for multi-line tabs or multiple tabs can appear pressed.
|
||||
if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS)
|
||||
{
|
||||
::SendMessage(_hSelf, TCM_SETCURFOCUS, index, 0);
|
||||
}
|
||||
|
||||
::SendMessage(_hSelf, TCM_SETCURSEL, index, 0);
|
||||
}
|
||||
|
||||
TBHDR nmhdr;
|
||||
nmhdr._hdr.hwndFrom = _hSelf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user