Skip to content

API inconsistency: setFullscreenButtonEnabled should use FullscreenButtonState #4967

@leaanthony

Description

@leaanthony

Description

The window options struct defines button states using the ButtonState type for minimize, maximize, and close:

MinimiseButtonState ButtonState
MaximiseButtonState ButtonState
CloseButtonState    ButtonState

However, the fullscreen button uses a different pattern — a setFullscreenButtonEnabled(bool) method with a simple bool instead of a FullscreenButtonState ButtonState option.

Expected

Add FullscreenButtonState ButtonState to the window options struct for consistency, and update the platform implementations to use it (currently only macOS implements it via NSWindowZoomButton).

Current behaviour

  • setFullscreenButtonEnabled(bool) exists as an internal method
  • Only implemented on macOS, no-op on Linux/Windows/iOS/Android
  • No corresponding option in WebviewWindowOptions

Files involved

  • v3/pkg/application/webview_window_options.go — options struct
  • v3/pkg/application/webview_window_darwin.go — macOS implementation
  • v3/pkg/application/webview_window_linux.go — Linux stub
  • v3/pkg/application/webview_window_windows.go — Windows (not implemented)

Additional context

Discovered during GTK4 window management work in #4957.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions