mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5010] [MERGED] fix(desktop): add win version checks for DWM attr api #5019
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5019
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5010
Author: @CuriousCorrelation
Created: 4/22/2025
Status: ✅ Merged
Merged: 4/25/2025
Merged by: @AndrewBastin
Base:
next← Head:fix-desktop-dwm-win-attr📝 Commits (1)
379b9cffix: add win version checks for DWM attr api📊 Changes
3 files changed (+34 additions, -19 deletions)
View changed files
📝
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/windows/posit.rs(+28 -13)📝
packages/hoppscotch-desktop/src-tauri/Cargo.lock(+1 -1)📝
pnpm-lock.yaml(+5 -5)📄 Description
This adds version checking before using Windows 11-specific DWM APIs.
Closes HFE-821
The desktop app crashes on startup on older Windows versions (pre-Windows 11) due to unsupported DWM API calls for dark mode and caption styling.
According to docs at https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute, both
DWMWA_USE_IMMERSIVE_DARK_MODEandDWMWA_CAPTION_COLORattributes are only supported starting with Windows 11 Build 22000.and
See https://github.com/hoppscotch/hoppscotch/discussions/4984 for more details, for reports of app crashing immediately on startup with these errors:
Notes to reviewers
The tests were all over the place, both attributes (sometimes!) seems to be present on Windows 10 1809 and even earlier, only if it was installed with network access, so perhaps this is due to Windows updates? Other times, they weren't, especially on VMs.
The issue is reproducible on Windows Server 2019 Datacenter (v10.0.17763), which is equivalent to Windows 10 version 1809.
This version is too old to support
DWMWA_USE_IMMERSIVE_DARK_MODE, which is only officially supported starting with Windows 11 Build 22000 according to Microsoft's documentation.So at the moment, relying on official docs seems to be the right call, and themes are definitely something app shouldn't crash for regardless.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.