Host: Add GetTopLevelWindowInfo()
And use it for screensaver inhibiting on Linux.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "common/window_info.h"
|
||||
#include "common/types.h"
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QMetaType>
|
||||
@@ -91,4 +92,10 @@ QIcon GetIconForRegion(DiscRegion region);
|
||||
QIcon GetIconForEntryType(GameList::EntryType type);
|
||||
QIcon GetIconForCompatibility(GameDatabase::CompatibilityRating rating);
|
||||
|
||||
/// Returns the pixel ratio/scaling factor for a widget.
|
||||
qreal GetDevicePixelRatioForWidget(const QWidget* widget);
|
||||
|
||||
/// Returns the common window info structure for a Qt widget.
|
||||
std::optional<WindowInfo> GetWindowInfoForWidget(QWidget* widget);
|
||||
|
||||
} // namespace QtUtils
|
||||
|
||||
Reference in New Issue
Block a user