WineFix: gate MainWindowLoaded patch behind a setting, default off (mitigates #46) - #56
Open
bluejorts wants to merge 1 commit into
Open
WineFix: gate MainWindowLoaded patch behind a setting, default off (mitigates #46)#56bluejorts wants to merge 1 commit into
bluejorts wants to merge 1 commit into
Conversation
On Affinity 3.2.3 the HasPreviousPackageInstalled patch sends the app down the fresh-install onboarding path, which hosts a WebView2CompositionControl that crashes under Wine (TypeLoadException: Windows.UI.Composition.Compositor, see noahc3#46). Forcing true instead triggers a bogus legacy beta font migration. Neither constant works on 3.2.x, so expose the patch as a main_window_loaded_fix setting defaulting to disabled; the unpatched method throwing under Wine skips onboarding, matching vanilla Affinity.exe behaviour. Trade-off: the prefs-saving fix is inactive unless the user opts in. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Affinity 3.2.3 the
MainWindowLoadedPatch(HasPreviousPackageInstalledreturningfalse) sends the app down the fresh-install onboarding path, which opens aWebView2CompositionControlthat crashes under Wine withTypeLoadException: Could not find Windows Runtime type 'Windows.UI.Composition.Compositor'(#46, full diagnosis there). Forcingtrueinstead triggers a legacy beta migration path, so no constant is safe on 3.2.x.This PR exposes the patch as a WineFix setting,
main_window_loaded_fix, defaulting to disabled. When disabled,HasPreviousPackageInstalledthrows under Wine as before, which abortsOnMainWindowLoadedbefore the onboarding page loads. That's the same (accidental) protection vanillaAffinity.exelaunches rely on.Trade-off
The prefs saving fix that this patch provides is inactive unless the user opts in. Users on Affinity versions where the onboarding path isn't hit can re-enable it from the WineFix preferences page. If you'd rather fix this by suppressing the onboarding WebView2 control so the patch can stay default-on, I can rework it in that direction.
Testing
Affinity 3.2.3.4646, Wine 11.13 + DXVK 3.0.2, Arch Linux, KDE Plasma (Wayland/XWayland), NVIDIA RTX 3090: