Skip to content

fix(cef): build cef_subprocess as a windowed app (no per-child console window)#231

Merged
Segfaultd merged 1 commit into
MafiaHub:developfrom
JEssou115:fix/cef-subprocess-no-console
Jul 11, 2026
Merged

fix(cef): build cef_subprocess as a windowed app (no per-child console window)#231
Segfaultd merged 1 commit into
MafiaHub:developfrom
JEssou115:fix/cef-subprocess-no-console

Conversation

@JEssou115

@JEssou115 JEssou115 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Problem

On Windows, launching a FrameworkClient pops several black console windows — one per CEF child process (renderer, GPU, utility, …). cef_subprocess is defined with add_executable(...) without a windowed subsystem, so every CEF subprocess spawns with a console window.

Fix

Link cef_subprocess with /SUBSYSTEM:WINDOWS while keeping its int main() entry point via /ENTRY:mainCRTStartup. One line in code/framework/CMakeLists.txt — the subprocess runs identically, just without a console window. Consistent with the surrounding MSVC-only client block.

Testing

Built on Windows (MSVC 14.44, RelWithDebInfo) — the CEF children no longer open console windows; the client and CEF views work as before.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved Windows application startup behavior for the CEF subprocess.
    • Prevented an unwanted console window from appearing when launching the subprocess.

…e window)

cef_subprocess is defined via add_executable() (console subsystem), so on Windows CEF spawns a
black console window per child process (renderer/GPU/utility/... — several windows) when a client
launches. Link it as /SUBSYSTEM:WINDOWS while keeping the int main() entry via /ENTRY:mainCRTStartup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 308bca6f-ba9a-43d4-9280-8a09cc102d91

📥 Commits

Reviewing files that changed from the base of the PR and between 5bf9433 and 0f3e253.

📒 Files selected for processing (1)
  • code/framework/CMakeLists.txt

Walkthrough

The CEF subprocess target now links with the Windows GUI subsystem while retaining the mainCRTStartup entry point.

Changes

CEF subprocess build configuration

Layer / File(s) Summary
Windows linker flags
code/framework/CMakeLists.txt
cef_subprocess uses /SUBSYSTEM:WINDOWS and /ENTRY:mainCRTStartup linker flags.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A bunny hops past the build tonight,
With Windows flags tucked out of sight.
The console fades, the startup stays,
CEF begins its GUI days.
Hop, hop—clean links all the way!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: building cef_subprocess as a Windows windowed app to avoid child console windows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Segfaultd

Copy link
Copy Markdown
Member

Thanks @JEssou115 for this PR. Looks good to me, I am merging.

@Segfaultd Segfaultd merged commit 73e51d6 into MafiaHub:develop Jul 11, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants