Fix Document Peeker constantly changing focus

1. Title Bar no longer flickers like crazy.
2. Can interact with other dialogs (such as "Find/Replace dialog" while hovering from tab to tab).

Fix #3324, close #5882
This commit is contained in:
AngryGamer 2019-07-04 11:27:17 -07:00 committed by Don HO
parent 2d15d90e02
commit 9acf6e302f
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
3 changed files with 3 additions and 4 deletions

View File

@ -179,7 +179,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
if (pBuf != currentBufMain && pBuf != currentBufSub) // if hover on other tab
{
_documentPeeker.doDialog(p, pBuf, *(const_cast<ScintillaEditView*>(pTabDocView->getScintillaEditView())));
_pEditView->getFocus();
}
else // if hover on current active tab
{

View File

@ -65,7 +65,7 @@ void DocumentPeeker::doDialog(POINT p, Buffer *pBuf, ScintillaEditView & scintSo
void DocumentPeeker::goTo(POINT p)
{
::SetWindowPos(_hSelf, HWND_TOP, p.x, p.y + 10, _rc.right - _rc.left, _rc.bottom - _rc.top, SWP_SHOWWINDOW);
::SetWindowPos(_hSelf, HWND_TOP, p.x, p.y + 10, _rc.right - _rc.left, _rc.bottom - _rc.top, SWP_SHOWWINDOW | SWP_NOACTIVATE);
}
@ -101,7 +101,6 @@ void DocumentPeeker::syncDisplay(Buffer *buf, ScintillaEditView & scintSource)
_pPeekerView->showMargin(3, false);
_pPeekerView->execute(SCI_SETCARETSTYLE, CARETSTYLE_INVISIBLE);
Window::display();
}
}

View File

@ -31,7 +31,8 @@
IDD_DOCUMENTSNAPSHOT DIALOGEX 26, 41, 140, 140
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU | WS_DISABLED
EXSTYLE WS_EX_NOACTIVATE
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
END