mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-14 02:00:15 +01:00
Qt: fix inhibit screensaver on Linux (X11)
This change fixes https://github.com/PCSX2/pcsx2/issues/7367. xdg-screensaver expects the given window ID to be that of the top level window.
This commit is contained in:
1 parent
a874c5455d
commit
ffe669137b
1 file changed
+3
-2
@@ -430,8 +430,9 @@ void CommonHost::UpdateInhibitScreensaver(bool inhibit)
|
||||
return;
|
||||
|
||||
WindowInfo wi;
|
||||
if (g_host_display)
|
||||
wi = g_host_display->GetWindowInfo();
|
||||
auto top_level_wi = Host::GetTopLevelWindowInfo();
|
||||
if (top_level_wi.has_value())
|
||||
wi = top_level_wi.value();
|
||||
|
||||
s_screensaver_inhibited = inhibit;
|
||||
if (!WindowInfo::InhibitScreensaver(wi, inhibit) && inhibit)
|
||||
|
||||
Reference in new issue
Block a user