Enhance C++ compatibility and window display logic#1
Conversation
Added extern 'C' block for C++ compatibility and adjusted window show behavior.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c60f5bfcc7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #ifdef __cplusplus | ||
| } |
There was a problem hiding this comment.
Keep extern "C" close inside the same preprocessor branch
The added #ifdef __cplusplus ... } is placed after #endif // MOON_PLATFORM_LINUX && !MOON_NO_GUI, while the matching extern "C" { is only emitted inside the Linux+GUI branch. When this file is compiled with MOON_NO_GUI (the CMake ENABLE_GUI=OFF path still compiles moonrt_gui_linux.cpp), the opener is skipped but the closer remains, producing a hard compile error (expected declaration before '}' token) and breaking no-GUI Linux builds.
Useful? React with 👍 / 👎.
|
|
||
|
|
||
| // By default, show window after webview finished loading | ||
| win->showPending = true; |
There was a problem hiding this comment.
Clear pending auto-show when creating hidden windows
Initializing win->showPending = true for every new window means the first WEBKIT_LOAD_FINISHED will always call gtk_widget_show_all. If an app hides the window before load completion via gui_show(false) or gui_show_win(id,false), those hide paths do not clear showPending, so the load callback re-shows the window unexpectedly; this regresses hidden/tray startup flows.
Useful? React with 👍 / 👎.
Added extern 'C' block for C++ compatibility and adjusted window show behavior.