Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/macos-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Related: secrets are stored in the login keychain, so they work without `keychai

## Minimum macOS version

`MACOSX_DEPLOYMENT_TARGET` is **10.15** in every Xcode configuration, and `LSMinimumSystemVersion` follows it. That is also the highest minimum among the macOS plugins in use (`file_selector_macos` and `url_launcher_macos` need 10.15; `package_info_plus`, `device_info_plus` and the vendored `refresh_rate` need 10.14). Raising it needs no plugin change, lowering it is not possible.
`MACOSX_DEPLOYMENT_TARGET` is **10.15** in every Xcode configuration, and `LSMinimumSystemVersion` follows it. That is also the highest minimum among the macOS plugins in use (`file_selector_macos` and `url_launcher_macos` need 10.15; `package_info_plus`, `device_info_plus` and `refresh_rate` need 10.14). Raising it needs no plugin change, lowering it is not possible.

Rendering above 60 Hz on a ProMotion display needs **macOS 14** or later (`refresh_rate`, see [motion and high refresh](motion-and-high-refresh.md)); on older versions the app runs at 60 Hz.

Expand Down
2 changes: 1 addition & 1 deletion docs/motion-and-high-refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Root cause (engine): per `flutter/flutter#160952`, the engine "can render at 120
### Practical implication for Querya (desktop)

- **Windows:** usually follows DWM monitor Hz; **measure and verify**.
- **Linux:** **query-only** — `enable` / prefer-max are no-ops in `third_party/refresh_rate` Linux plugin. Overlay/`RefreshRate.info` report what GDK sees; actual frame pacing is compositor-dependent. Do not treat a 120/144 reading as “unlocked by Querya”.
- **Linux:** **query-only** — `enable` / prefer-max are no-ops in the `refresh_rate` Linux plugin. Overlay/`RefreshRate.info` report what GDK sees; actual frame pacing is compositor-dependent. Do not treat a 120/144 reading as “unlocked by Querya”.
- **macOS:** unlock via `RefreshRate.enable()` when capped at 60 (ProMotion / high-Hz).
- Use `refresh_rate` for **diagnostics** (debug overlay / benchmark) plus the macOS unlock in `main()`.
- **Implementation:** `lib/core/motion/display_refresh_service.dart` calls `RefreshRate.enable()` in `main()`. Debug Hz badge: `flutter run --dart-define=QUERYA_REFRESH_OVERLAY=true`.
Expand Down
9 changes: 7 additions & 2 deletions lib/core/motion/display_refresh_service.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:refresh_rate/refresh_rate.dart';

Expand All @@ -7,7 +9,8 @@ import 'package:refresh_rate/refresh_rate.dart';
/// - **macOS 14+:** ProMotion / high-Hz unlock
/// - **Windows:** typically follows DWM (enable is effectively a no-op unlock)
/// - **Linux:** **query-only** — enable is a no-op; [RefreshRate.info] / overlay
/// report GDK monitor refresh (compositor decides actual pacing)
/// report GDK monitor refresh (compositor decides actual pacing). An unknown
/// rate reads 0 Hz (it no longer falls back to 60)
///
/// Debug overlay: `flutter run --dart-define=QUERYA_REFRESH_OVERLAY=true`.
abstract final class DisplayRefreshService {
Expand All @@ -17,7 +20,8 @@ abstract final class DisplayRefreshService {

/// Unlock peak refresh where the platform supports it; log Hz in debug builds.
static void initialize() {
RefreshRate.enable();
// 2.x returns the result of the request; nothing here acts on it.
unawaited(RefreshRate.enable());

if (!kDebugMode) return;

Expand All @@ -31,6 +35,7 @@ abstract final class DisplayRefreshService {
}

static void _logRefreshInfo() {
// The first reading can still be 0 Hz: 2.x fills `info` asynchronously.
final info = RefreshRate.info;
debugPrint(
'Display refresh: ${info.currentRate} Hz '
Expand Down
12 changes: 5 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
http: ^1.2.2
crypto: ^3.0.6
refresh_rate: ^1.0.2
refresh_rate: ^2.0.1
shadcn_flutter: ^0.0.52
bitsdojo_window: ^0.1.6
path: ^1.9.0
Expand Down Expand Up @@ -56,16 +56,14 @@ dependency_overrides:
# Patched ToastLayer (fixes InheritedNotifier crash on resize / hot reload).
shadcn_flutter:
path: third_party/shadcn_flutter
# Linux -Werror: fix uninitialized rates[0] in refresh_rate 1.0.2.
refresh_rate:
path: third_party/refresh_rate

flutter:
uses-material-design: true
config:
# The vendored refresh_rate plugin's Package.swift points its target at
# ../Classes, outside the package root, so Swift Package Manager (on by
# default since Flutter 3.47) cannot resolve it; macOS builds use CocoaPods.
# Swift Package Manager (on by default since Flutter 3.47) is off for every
# plugin: macOS builds use CocoaPods. The vendored refresh_rate plugin that
# needed this is gone (refresh_rate 2.x has a valid Package.swift); whether
# to turn it back on is its own change, to be tried on a Mac.
enable-swift-package-manager: false
assets:
- assets/images/
Expand Down
60 changes: 0 additions & 60 deletions third_party/refresh_rate/CHANGELOG.md

This file was deleted.

24 changes: 0 additions & 24 deletions third_party/refresh_rate/LICENSE

This file was deleted.

230 changes: 0 additions & 230 deletions third_party/refresh_rate/README.md

This file was deleted.

Loading
Loading