[PR #457] [MERGED] Add custom window / native window controls #880

Closed
opened 2026-10-31 22:17:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/desktop/pull/457
Author: @webfiltered
Created: 12/10/2024
Status: ✅ Merged
Merged: 12/29/2024
Merged by: @huchenlei

Base: main ← Head: custom-window


📝 Commits (10+)

  • a5083ff Allow preload types to be used in frontend
  • 0760c3b Hide default titlebar on win32 / linux
  • 6dbcce9 Add interop for theme change handling
  • 8032a2c Export overlay options
  • 2f62b20 Add windowStyle setting
  • 148bc56 Allow disabling of modern window style
  • 1db704a Fix height change ignored
  • b09ea0b Prevent zero overlay height
  • 4644fc5 Remove coupling requirement from initial feature
  • cb4b186 Add TS types, nits

📊 Changes

7 files changed (+90 additions, -11 deletions)

View changed files

📝 src/constants.ts (+2 -0)
📝 src/handlers/appInfoHandlers.ts (+7 -0)
📝 src/main-process/appWindow.ts (+35 -1)
📝 src/main-process/comfyDesktopApp.ts (+4 -1)
📝 src/main_types.ts (+1 -0)
📝 src/preload.ts (+35 -9)
📝 src/store/desktopSettings.ts (+6 -0)

📄 Description

Modern linux / win32 window

  • Requires #567
  • Provides API only; screenshots are examples
  • Adds OS-native window code for custom window replacement on linux / win32
    • Adjusts button size to toolbar
    • Transparent background
    • Theme-reactive - colours dictated by frontend API
  • Enables (WIP) Comfy-Org/ComfyUI_frontend/pull/1856
  • No changes to default behaviour

Example implementation:

image

https://github.com/user-attachments/assets/558b80d9-8cdd-48de-8adb-d8f55721bbea

// Configured in config.json
"windowStyle": "default" | "custom"

┆Issue is synchronized with this Notion page by Unito


🔄 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/Comfy-Org/desktop/pull/457 **Author:** [@webfiltered](https://github.com/webfiltered) **Created:** 12/10/2024 **Status:** ✅ Merged **Merged:** 12/29/2024 **Merged by:** [@huchenlei](https://github.com/huchenlei) **Base:** `main` ← **Head:** `custom-window` --- ### 📝 Commits (10+) - [`a5083ff`](https://github.com/Comfy-Org/desktop/commit/a5083ff1b06a455f8e3170ca8416d86fa87c87f1) Allow preload types to be used in frontend - [`0760c3b`](https://github.com/Comfy-Org/desktop/commit/0760c3bdc979e40314a1d7d84b2bfcb1de28e735) Hide default titlebar on win32 / linux - [`6dbcce9`](https://github.com/Comfy-Org/desktop/commit/6dbcce99363c80a5e6364454cce5f93e27e4643b) Add interop for theme change handling - [`8032a2c`](https://github.com/Comfy-Org/desktop/commit/8032a2cb50b7e341e24de8edb69b07b73474a853) Export overlay options - [`2f62b20`](https://github.com/Comfy-Org/desktop/commit/2f62b20da2e4866bef7d1e1200f11f6f5b724f17) Add windowStyle setting - [`148bc56`](https://github.com/Comfy-Org/desktop/commit/148bc56863a8d0eeaf61d4196b55446224b6710c) Allow disabling of modern window style - [`1db704a`](https://github.com/Comfy-Org/desktop/commit/1db704a3464575506e8179988f0847f57a02136d) Fix height change ignored - [`b09ea0b`](https://github.com/Comfy-Org/desktop/commit/b09ea0b0ef5273f1683b7d6271bc793f86074393) Prevent zero overlay height - [`4644fc5`](https://github.com/Comfy-Org/desktop/commit/4644fc51863cda4ef7f9638cd6f5ba50e3bbfa08) Remove coupling requirement from initial feature - [`cb4b186`](https://github.com/Comfy-Org/desktop/commit/cb4b18610b9c94cc200f9a098581ce40950c0f0e) Add TS types, nits ### 📊 Changes **7 files changed** (+90 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/constants.ts` (+2 -0) 📝 `src/handlers/appInfoHandlers.ts` (+7 -0) 📝 `src/main-process/appWindow.ts` (+35 -1) 📝 `src/main-process/comfyDesktopApp.ts` (+4 -1) 📝 `src/main_types.ts` (+1 -0) 📝 `src/preload.ts` (+35 -9) 📝 `src/store/desktopSettings.ts` (+6 -0) </details> ### 📄 Description ### Modern linux / win32 window - Requires #567 - Provides API only; screenshots are examples - Adds OS-native window code for custom window replacement on linux / win32 - Adjusts button size to toolbar - Transparent background - Theme-reactive - colours dictated by frontend API - Enables (WIP) Comfy-Org/ComfyUI_frontend/pull/1856 - No changes to default behaviour #### Example implementation: ![image](https://github.com/user-attachments/assets/ba0356e8-c0a1-4a35-87c8-1bf725bddb59) https://github.com/user-attachments/assets/558b80d9-8cdd-48de-8adb-d8f55721bbea ```ts // Configured in config.json "windowStyle": "default" | "custom" ``` ┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-1964-Add-custom-window-native-window-controls-15f6d73d365081a7901bccad64315f02) by [Unito](https://www.unito.io) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:17:42 +00: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
Comfy-Org/desktop#880
No description provided.