Skip to content

feat: add FullscreenButtonState to WebviewWindowOptions for API consistency#5183

Draft
leaanthony wants to merge 1 commit intomasterfrom
fix/4967-fullscreen-button-state
Draft

feat: add FullscreenButtonState to WebviewWindowOptions for API consistency#5183
leaanthony wants to merge 1 commit intomasterfrom
fix/4967-fullscreen-button-state

Conversation

@leaanthony
Copy link
Copy Markdown
Member

Description

Adds FullscreenButtonState ButtonState to WebviewWindowOptions for consistency with the existing MinimiseButtonState, MaximiseButtonState, and CloseButtonState fields.

Previously, the fullscreen button used setFullscreenButtonEnabled(bool) with a simple bool, while all other titlebar buttons used the ButtonState type (Enabled/Disabled/Hidden).

Changes:

  • Add FullscreenButtonState ButtonState to WebviewWindowOptions
  • Update macOS C code from setFullscreenButtonEnabled(bool) to setFullscreenButtonState(int) using the same setButtonState pattern as other buttons — now supports Hidden state too
  • Add setFullscreenButtonState(ButtonState) to all platform implementations (Linux, Windows, iOS, Android)
  • Apply FullscreenButtonState during window initialization on macOS and Windows
  • Keep setFullscreenButtonEnabled(bool) for backward compatibility

Files changed:

  • webview_window_options.go — new option field
  • webview_window_darwin.go — C code + Go wrapper updated
  • webview_window_linux.go — new stub
  • webview_window_windows.go — new stub + init
  • webview_window_ios.go — new stub
  • webview_window_android.go — new stub

Fixes #4967

Type of change

  • Enhancement (non-breaking change — new option field, default zero-value is ButtonEnabled which matches current behavior)

How Has This Been Tested?

  • go build ./pkg/application/ compiles cleanly on Linux
  • Cross-platform stubs verified for all platforms
  • macOS testing needed — I don't have access to a macOS environment to verify the CGo changes

Checklist:

  • My code follows the general coding style of this project
  • My changes generate no new warnings
  • Platform testing needed on macOS

…stency

The window options struct defines button states using ButtonState for
minimise, maximize, and close buttons, but the fullscreen button used
setFullscreenButtonEnabled(bool) with a simple bool. This adds
FullscreenButtonState ButtonState to the options struct for consistency.

Changes:
- Add FullscreenButtonState ButtonState to WebviewWindowOptions
- Update macOS C code to use setButtonState pattern (supports
  enabled/disabled/hidden instead of just enabled/disabled)
- Add setFullscreenButtonState to all platform implementations
- Apply FullscreenButtonState during window initialization on macOS
  and Windows (no-op on Linux/iOS/Android)
- Keep setFullscreenButtonEnabled(bool) for backward compatibility

Fixes #4967
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 19, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4ca5fb52-f93a-4aab-bd02-8e1688710d98

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/4967-fullscreen-button-state

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 and usage tips.

@leaanthony leaanthony changed the base branch from v3-alpha to master April 29, 2026 13:07
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.

API inconsistency: setFullscreenButtonEnabled should use FullscreenButtonState

1 participant