Commit 8dde5e63 by Carwyn

Fixes: 取消附加前台窗口纯种,解决前台窗口等待时,会员窗口延迟唤起导致的假死问题

parent daf2cd68
...@@ -58,21 +58,14 @@ void FMVipWnd::setIsBusy(const bool isBusy) ...@@ -58,21 +58,14 @@ void FMVipWnd::setIsBusy(const bool isBusy)
int FMVipWnd::exec() int FMVipWnd::exec()
{ {
show(); showNormal();
HWND hForeWnd = ::GetForegroundWindow(); ::SetForegroundWindow((HWND)effectiveWinId());
DWORD dwForeID = ::GetWindowThreadProcessId(hForeWnd,NULL);
DWORD dwCurID = ::GetCurrentThreadId();
::AttachThreadInput(dwCurID,dwForeID,TRUE);
::SetWindowPos( (HWND)effectiveWinId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); ::SetWindowPos( (HWND)effectiveWinId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
::SetWindowPos( (HWND)effectiveWinId(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); ::SetWindowPos( (HWND)effectiveWinId(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
showNormal(); showNormal();
::SetForegroundWindow((HWND)effectiveWinId());
::SetForegroundWindow( (HWND)this->effectiveWinId());
::AttachThreadInput(dwCurID,dwForeID,FALSE);
return QDialog::exec(); return QDialog::exec();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment