ShardBrowser icon indicating copy to clipboard operation
ShardBrowser copied to clipboard

2.0.2: launch-time screen clamp on Windows/Linux overrides the profile's screen with the host display on every start

Open angeloathayde opened this issue 2 months ago • 1 comments

Environment: ShardX Launcher 2.0.2, Windows 11, host display 5120×1440 (scale 1.0), engine Chromium 152 build 3. Profiles created through the local API (POST /profiles, fingerprint stored verbatim) with screen = 1920×1080 / avail_height 1032.

What changed in 2.0.2

launch.rs now calls clamp_screen_to_real_display on every launch when screen_resolution_mode != "real":

if settings::load()?.screen_resolution_mode.as_deref() != Some("real") {
    if let Some(w) = crate::main_window() {
        crate::clamp_screen_to_real_display(&w, &mut raw);
    }
}

and clamp_screen_to_real_display replaces screen.width/height with the real monitor unconditionally on Windows/Linux (// macOS keeps curated FP unless real display smaller; Win/Linux always uses real.). In 2.0.1 the clamp only ran in enrich_new_config (UI-created profiles), so an API-created or PATCHed fingerprint reached the engine as stored.

Effect

A profile that declares 1920×1080 (the most common desktop resolution) now reports the host's 5120×1440 on every start — for every profile on the machine. Ultrawide/uncommon resolutions are high-entropy and identical across all profiles on the host, which is the opposite of what a fingerprint profile is for. There is no way to opt out: screen_resolution_mode = "real" also reports the host.

The changelog motivation ("window opened small on a bigger monitor and maximise did nothing") is a window sizing problem; solving it by rewriting the screen the page sees trades a cosmetic issue for a fingerprint one.

Request

Any of:

  1. On Windows/Linux, behave like macOS: keep the fingerprint screen when it fits the real display (real_w >= fp_w && real_h >= fp_h), clamp only when it does not.
  2. A setting (e.g. screen_resolution_mode = "fingerprint-strict") that skips the launch-time clamp.
  3. Fix the window sizing independently of the reported screen (let the window grow to the real desktop while screen.* stays the profile's).

Happy to test a build.

angeloathayde avatar Sep 12 '26 22:09 angeloathayde

in v2.0.3

ProxyShard avatar Sep 13 '26 12:09 ProxyShard