X11Tools: Fix refresh rate query failing with XLib handle

This commit is contained in:
Stenzek 2025-01-04 18:35:12 +10:00
parent 076f4a6293
commit 8353a33e89
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ std::optional<float> GetRefreshRateFromXRandR(const WindowInfo& wi, Error* error
}
xcb_window_t window = static_cast<xcb_window_t>(reinterpret_cast<uintptr_t>(wi.window_handle));
if (wi.type != WindowInfo::Type::XCB || !connection || window == XCB_NONE)
if (!connection || window == XCB_NONE)
{
Error::SetStringView(error, "Invalid window handle.");
return std::nullopt;