mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 05:05:44 +00:00
Bring RenderDoc window to foreground when event is selected from RGP
This commit is contained in:
@@ -1675,6 +1675,22 @@ QString GetSystemUsername()
|
||||
return username;
|
||||
}
|
||||
|
||||
void BringToForeground(QWidget *window)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
SetWindowPos((HWND)window->winId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
window->setWindowState(Qt::WindowActive);
|
||||
window->raise();
|
||||
window->showNormal();
|
||||
window->show();
|
||||
SetWindowPos((HWND)window->winId(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
#else
|
||||
window->activateWindow();
|
||||
window->raise();
|
||||
window->showNormal();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool IsDarkTheme()
|
||||
{
|
||||
float baseLum = getLuminance(QApplication::palette().color(QPalette::Base));
|
||||
|
||||
Reference in New Issue
Block a user