Host: Add GetTopLevelWindowInfo()

And use it for screensaver inhibiting on Linux.
This commit is contained in:
Connor McLaughlin
2022-11-18 18:14:39 +10:00
parent 3d4d2336a9
commit 8d7aea5e19
25 changed files with 133 additions and 126 deletions

View File

@ -2520,6 +2520,13 @@ void MainWindow::checkForSettingChanges()
updateWindowState();
}
void MainWindow::getWindowInfo(WindowInfo* wi)
{
std::optional<WindowInfo> opt_wi(QtUtils::GetWindowInfoForWidget(this));
if (opt_wi.has_value())
*wi = opt_wi.value();
}
void MainWindow::onCheckForUpdatesActionTriggered()
{
// Wipe out the last version, that way it displays the update if we've previously skipped it.