Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.2.1, 5.3.0 Alpha
-
None
-
7b797982751dad3a448037ae99c4c8967529dddc (qtase/5.11, 10.6.2018, 5.11.1)
Description
It's a lot of opened bugs here about background process's window activation under windows. The problem is in SetForegroundWindow function. Correct behavior described in Remarks section but not all section works as described. But here is well-known solution AttachThreadInput.
SetForegroundWindow used in
void QWindowsWindow::requestActivateWindow() { qCDebug(lcQpaWindows) << __FUNCTION__ << this << window(); // 'Active' state handling is based in focus since it needs to work for // child windows as well. if (m_data.hwnd) { SetForegroundWindow(m_data.hwnd); SetFocus(m_data.hwnd); } }
which used from QWindow::requestActive() and QWidget::activateWindow()
I think we should implement this workaround.
I have tested this solution under Windows 7 x64 and it works!
Attachments
Issue Links
- relates to
-
QTBUG-24776 Support bringing apps to the foreground
-
- Closed
-
-
QTBUG-1943 activateWindow() on ms-windows could do better
-
- Closed
-
-
QTBUG-14062 QWidget ::activateWindow() - behavior under windows
-
- Closed
-