fix: aggressive window refresh loop and focus-stealing on Windows - #20
Open
ZFordDev wants to merge 3 commits into
Open
fix: aggressive window refresh loop and focus-stealing on Windows#20ZFordDev wants to merge 3 commits into
ZFordDev wants to merge 3 commits into
Conversation
Detect a low-spec profile (<=4 logical cores and <=8 GiB RAM) and disable hardware acceleration before QApplication construction. This sidesteps the GPU/DWM recomposition loop that causes the translucent HUD to flicker and steal focus on older Windows machines. Closes #19.
Qt 6 removed AA_DisableHardwareAcceleration; the fallback used a nonexistent attribute and would have crashed low-spec hosts at startup. Switch to AA_UseSoftwareOpenGL and apply the low-spec software-rendering fallback on every platform for consistent behavior independent of the compositor or graphics stack. Factor the decision into a testable helper.
7 tasks
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.
Fixes #19
Summary
On legacy hardware (<=4 logical cores AND <=8 GiB RAM), Glint's translucent, painter-rendered HUD triggers a GPU/DWM recomposition loop that causes window flicker and focus-stealing. This PR adds a hardware capability check that forces software rendering on qualifying machines before the QApplication is constructed.
Changes
Important correction during implementation
The initial fallback used \AA_DisableHardwareAcceleration, which does not exist in Qt 6 and would have crashed at startup on every low-spec machine. A test I added caught this; the fallback now uses Qt 6's replacement \AA_UseSoftwareOpenGL.
Notes
Physical reproduction on a Dell Optiplex SFF (or a Windows 10 VM) is still needed to confirm the DWM behavior resolves on live low-spec hardware, per the reproduction checklist in the issue. The detection/decision logic is unit-tested.