X11Tools: Fix refresh rate query failing with XLib handle
This commit is contained in:
parent
076f4a6293
commit
8353a33e89
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue