[PR #3939] [MERGED] fix(desktop): set window caption color if Windows version >= 11 #4606

Closed
opened 2026-03-17 02:07:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3939
Author: @Timic3
Created: 3/27/2024
Status: Merged
Merged: 4/16/2024
Merged by: @AndrewBastin

Base: release/2024.3.1Head: fix/desktop-win10-crash


📝 Commits (2)

  • 8deffb3 fix(desktop): set window caption color if Windows version >= 11
  • 54db943 chore(desktop): use winver crate to detect Windows version

📊 Changes

3 files changed (+29 additions, -9 deletions)

View changed files

📝 packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock (+10 -0)
📝 packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml (+1 -0)
📝 packages/hoppscotch-selfhost-desktop/src-tauri/src/win/window.rs (+18 -9)

📄 Description

Closes #3524

Description

This pull request fixes Windows 10 crash when application is opened. It happened due to DWMWA_CAPTION_COLOR being available only on Windows 11 (build number 22000) and up (see here). This is fixed by checking Windows version number and build, however it is also fixable by just catching the error, but it's probably best not to fill Windows event log with errors.

Checks

  • My pull request adheres to the code style of this project
  • All the tests have passed

Additional Information

I haven't tested this on Windows 11 yet, however feel free to test it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3939 **Author:** [@Timic3](https://github.com/Timic3) **Created:** 3/27/2024 **Status:** ✅ Merged **Merged:** 4/16/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `release/2024.3.1` ← **Head:** `fix/desktop-win10-crash` --- ### 📝 Commits (2) - [`8deffb3`](https://github.com/hoppscotch/hoppscotch/commit/8deffb38b3faef6b73fbc595dd7148b1b745a5c9) fix(desktop): set window caption color if Windows version >= 11 - [`54db943`](https://github.com/hoppscotch/hoppscotch/commit/54db943ce3963632e306800c37f4bcf0c44dc1c0) chore(desktop): use winver crate to detect Windows version ### 📊 Changes **3 files changed** (+29 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock` (+10 -0) 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml` (+1 -0) 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/src/win/window.rs` (+18 -9) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #3524 <!-- Issue # here --> ### Description <!-- Add a brief description of the pull request --> This pull request fixes Windows 10 crash when application is opened. It happened due to `DWMWA_CAPTION_COLOR` being available only on Windows 11 (build number 22000) and up (see [here](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute)). This is fixed by checking Windows version number and build, however it is also fixable by just catching the error, but it's probably best not to fill Windows event log with errors. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> I haven't tested this on Windows 11 yet, however feel free to test it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:07:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4606
No description provided.