Merge pull request #14408 from unknownbrackets/windows-focus

Windows: Reduce focus juggling on game start
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2021-04-25 10:48:02 +02:00
commit dbe6658803
5 files changed
+13 -10

No files matched your search

+2 -2
View File
@@ -848,14 +848,14 @@ void CDisasm::SetDebugMode(bool _bDebug, bool switchPC)
}
}
void CDisasm::Show(bool bShow) {
void CDisasm::Show(bool bShow, bool includeToTop) {
if (deferredSymbolFill_ && bShow) {
if (g_symbolMap) {
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), ST_FUNCTION);
deferredSymbolFill_ = false;
}
}
Dialog::Show(bShow);
Dialog::Show(bShow, includeToTop);
}
void CDisasm::NotifyMapLoaded() {
+1 -1
View File
@@ -49,7 +49,7 @@ public:
CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *cpu);
~CDisasm();
void Show(bool bShow) override;
void Show(bool bShow, bool includeToTop = true) override;
void Update() override {
UpdateDialog(true);
+1 -3
View File
@@ -540,7 +540,7 @@ namespace MainWindow
void CreateDebugWindows() {
disasmWindow = new CDisasm(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
DialogManager::AddDlg(disasmWindow);
disasmWindow->Show(g_Config.bShowDebuggerOnLoad);
disasmWindow->Show(g_Config.bShowDebuggerOnLoad, false);
#if PPSSPP_API(ANY_GL)
geDebuggerWindow = new CGEDebugger(MainWindow::GetHInstance(), MainWindow::GetHWND());
@@ -935,8 +935,6 @@ namespace MainWindow
if (disasmWindow)
disasmWindow->UpdateDialog();
SetForegroundWindow(hwndMain);
break;
case WM_USER_SAVESTATE_FINISH:
+8 -3
View File
@@ -30,11 +30,16 @@ void Dialog::Destroy()
DestroyWindow(m_hDlg);
}
void Dialog::Show(bool _bShow)
void Dialog::Show(bool _bShow, bool includeToTop)
{
m_bShowState = _bShow ? SW_NORMAL : SW_HIDE;
if (_bShow && includeToTop)
m_bShowState = SW_SHOWNORMAL;
else if (_bShow)
m_bShowState = SW_SHOWNOACTIVATE;
else
m_bShowState = SW_HIDE;
ShowWindow(m_hDlg, m_bShowState);
if (_bShow)
if (_bShow && includeToTop)
BringWindowToTop(m_hDlg);
}
+1 -1
View File
@@ -8,7 +8,7 @@ public:
Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent);
virtual ~Dialog();
virtual void Show(bool _bShow);
virtual void Show(bool _bShow, bool includeToTop = true);
virtual void Update() {}
HWND GetDlgHandle() {