Skip to content

Enhance C++ compatibility and window display logic#1

Open
xinye0123 wants to merge 1 commit into
mainfrom
fix-bug-on-linux
Open

Enhance C++ compatibility and window display logic#1
xinye0123 wants to merge 1 commit into
mainfrom
fix-bug-on-linux

Conversation

@xinye0123

Copy link
Copy Markdown
Owner

Added extern 'C' block for C++ compatibility and adjusted window show behavior.

Added extern 'C' block for C++ compatibility and adjusted window show behavior.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +1096 to +1097
#ifdef __cplusplus
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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.

1 participant