* Fix Windows build error with go-webview2 v1.0.22
Fixes#4513
The go-webview2 library changed the MessageCallback signature in v1.0.22
from `func(string)` to `func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs)`.
This caused a build error for users:
```
cannot use w.processMessage (value of type func(message string)) as
func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs)
value in assignment
```
Changes:
- Updated processMessage signature to match go-webview2 v1.0.22
- Upgraded go-webview2 dependency from v1.0.21 to v1.0.22
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix Windows build error with go-webview2 v1.0.22
Fixes#4513
The go-webview2 library changed the MessageCallback signature in v1.0.22
from `func(string)` to `func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs)`.
This caused a build error for users:
```
cannot use w.processMessage (value of type func(message string)) as
func(message string, sender *ICoreWebView2, args *ICoreWebView2WebMessageReceivedEventArgs)
value in assignment
```
Changes:
- Updated processMessage signature to match go-webview2 v1.0.22
- Upgraded go-webview2 dependency from v1.0.21 to v1.0.22
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Move HandlePlatformFileDrop to window._wails internal API
Fixes#4489
## Problem
The npm package @wailsio/runtime doesn't work for drag-and-drop because
Go backend calls window.wails.Window.HandlePlatformFileDrop(), but the
npm package doesn't populate window.wails (by design for encapsulation).
## Root Cause
PR #3295 (March 2024) intentionally removed window.wails assignment from
the npm package to improve encapsulation. However, this broke platform
handlers that Go backend relies on.
## Solution
Move HandlePlatformFileDrop from public API (window.wails) to internal
API (window._wails), following the existing pattern:
- window._wails.invoke
- window._wails.environment
- window._wails.flags
## Changes
- Register handlePlatformFileDrop in window._wails namespace
- Update Go backend to call window._wails.handlePlatformFileDrop()
- Use camelCase naming for consistency with other internal API methods
- Rebuild bundled runtime with changes
## Benefits
✅ npm package works without window.wails pollution
✅ Maintains encapsulation of public API
✅ Platform handlers clearly separated as internal
✅ Follows existing internal API conventions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: Add changelog entry for drag-and-drop fix
Updates UNRELEASED_CHANGELOG.md with the fix for #4489.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: prevent white window flash when Hidden option is true
Fixes#4611
When creating a window with Hidden: true, the window was briefly
visible as a white window before disappearing. This was caused by
CreateWindowEx using WS_OVERLAPPEDWINDOW style which includes
WS_VISIBLE by default.
The fix excludes WS_VISIBLE from the window style when the Hidden
option is set to true, ensuring the window remains invisible until
explicitly shown via window.Show().
* Update Changelog
* Fixed Wayland related window maximum size issues on ultrawide monitors by adding a monitor-window search fallback.
* Fixed Wayland related window maximum size issues on ultrawide monitors by adding a monitor-window search fallback.
* Added note to UNRELEASED_CHANGELOG.md regarding Wayland ultrawide monitor fix of issue 4439.
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* feat: Binds window menu to app windows
* chore: disables tab feature & controls from menu by default
* docs: Adds title to example for it to show in the window menu item
* style: removes redundant SetBackgroundColor call
* chore: rolls back disabling tab controls for a future optional config
* docs: adds change description to unreleased notes
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* fix: compilation issue when using react+next application
When building with next, I got an error during the "collecting page data" step.
Cannot find module '/home/node/application/node_modules/@wailsio/runtime/dist/utils' imported from /home/node/application/node_modules/@wailsio/runtime/dist/contextmenu.js] {
code: 'ERR_MODULE_NOT_FOUND',
* doc: added fix in the changelog
* fix: updated UNRELEASED_CHANGELOG.md
* doc: follow naming convention
* Remove v2 changelog entry
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Check for empty buffers instead of nil in responsewriter
Use Case:
I am using a service that implements `http.Handler` to send streaming
video to the frontend. Reliably, when sending fragmented MP4 data on
MacOS, the app would panic because the buffer being sent through the
response passed a not-nil check but would panic when accessing the first
byte of the buffer.
This PR addresses that by checking if the buffer is not empty instead of
nil, accounting for the case where len(buf) == 0 and cap(buf) > 0, or
maybe where buf[0] == '\0' (I'm not sure how the nil checks work for
slices)
* Update UNRELEASED_CHANGELOG
* Update v3/internal/assetserver/webview/responsewriter_darwin.go
nil and len check
---------
Co-authored-by: Atterpac <89053530+atterpac@users.noreply.github.com>
* fix(macOS): Use visibleFrame for window centering to exclude menu bar
The windowCenter() function was using [screen frame] which includes
the menu bar and dock areas, causing windows to appear positioned
too high on the screen when centered.
This change uses [screen visibleFrame] instead, which excludes the
menu bar and dock areas, resulting in proper visual centering.
Fixes vertical centering issue on macOS in Wails v3 alpha.
* Update v3/UNRELEASED_CHANGELOG.md
* Update changelog entry format
---------
Co-authored-by: Atterpac <89053530+atterpac@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* feat: Implement native Liquid Glass effect for macOS
feat: Add platform check for Liquid Glass demo
Show informative dialog on Windows/Linux explaining that the Liquid Glass
effect is a macOS-specific feature. The demo will exit gracefully on
non-macOS platforms.
docs: Add Liquid Glass feature to unreleased changelog
feat: Enhanced Liquid Glass effect with NSVisualEffectMaterial support
Major improvements to the Liquid Glass implementation for macOS:
- Added comprehensive NSVisualEffectMaterial support with 15+ material options
- Removed debug NSLog statements for cleaner production code
- Created multi-window demo showcasing 7 different glass effects:
* Light Style - Clean light appearance
* Dark Style - Dark themed glass
* Vibrant Style - Enhanced transparency
* Blue Tint - Custom RGBA tint color example
* Sheet Material - NSVisualEffectMaterialSheet
* HUD Window - Ultra-light HUD material
* Content Background - With warm tint color
- Added Material field to MacLiquidGlass struct for fine-grained control
- Improved demo design with proper Title Case and cleaner layout
- Fixed logo sizing to prevent blur
- All windows fully draggable with InvisibleTitleBarHeight
- Added comprehensive README documentation
The implementation now provides developers with complete control over the
glass effect appearance, supporting both native NSGlassEffectView (macOS 15.0+)
and NSVisualEffectView fallback for older systems.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
feat: Implement native Liquid Glass effect for macOS
- Add support for NSGlassEffectView on macOS 15.0+
- Implement runtime detection of native glass APIs
- Add fallback to enhanced NSVisualEffectView for older systems
- Update liquid glass demo with frameless windows for better visibility
- Support all NSGlassEffectView properties (cornerRadius, tintColor, style)
- Properly handle webview layering with glass effect
- Remove binary from version control
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Address CodeRabbit review feedback
- Comment out unimplemented ReduceMotion and StaticMode fields
- Remove overly broad draggable CSS properties
- Add corner radius validation
- Improve CSS with proper pointer-events and user-select
- Add clarifying comments about future features
* fix: Remove unimplemented ReduceMotion and StaticMode fields
Completely remove the commented-out performance optimization fields
as they are not implemented and have no timeline for implementation.
* fix: Update windowRemoveVisualEffects to also remove NSGlassEffectView instances
The cleanup function now properly removes both NSVisualEffectView and
NSGlassEffectView instances to prevent orphaned effect layers. Uses
NSClassFromString to avoid hard references to NSGlassEffectView which
is only available on macOS 15.0+.
* fix changelog
* Update v3/pkg/application/webview_window_darwin.m
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update v3/pkg/application/webview_window_darwin.m
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: Fix compilation errors in windowSetLiquidGlass
- Add missing NSGlassEffectViewStyle enum definition
- Fix undefined tintColor variable by creating NSColor before use
- Add autorelease to prevent memory leaks for allocated views
These issues were causing CI build failures while working locally due to different compiler settings.
* Update Taskfile.yaml
* feat: Implement groupID and groupSpacing for NSGlassEffectView
- Add runtime detection for groupIdentifier/groupName selectors
- Apply groupID via performSelector if supported
- Apply groupSpacing via KVC if supported
- Parameters are now functional when NSGlassEffectView supports them
- Maintains backward compatibility by checking selector availability
* test: Add liquid-glass example to test suite
- Add liquid-glass to EXAMPLEDIRS in Taskfile.yaml
- Ensures the example is tested during CI builds
- Validates compilation on different platforms
Addresses review comment about missing test coverage
* fix: Correct NSGlassEffectView availability to macOS 26.0
- Update @available checks from macOS 15.0 to 26.0 for NSGlassEffectView
- NSGlassEffectView is a private API introduced in macOS 26.0
- Update README to reflect correct version requirement
- Keep NSVisualEffectMaterial checks at 15.0 as those are different APIs
* fix: Prevent exceptions from unsafe WebView reparenting
- Remove early WebView addition to glassView.contentView
- Consolidate all WebView reparenting in one safe location
- Always call removeFromSuperview before adding to new parent
- Set frame and autoresizing mask after safe reparenting
- Prevents NSInternalInconsistencyException from multiple parents
* fix: Make WebView reparenting more robust and thread-safe
- Always call removeFromSuperview before adding to new parent
- Remove brittle superview check, always detach and reattach
- Check both webView and glassContentView are non-nil before operations
- Ensure all UI operations run on main thread with dispatch_sync
- Set frame and autoresizing mask after safe reparenting
* Tidy up
* Update changelog
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: make options in update build-assets override
Before this fix, if `-config` was passed to `wails3 update
build-assets`, the values in the config file, even if they were empty,
would be used. Now, we only use the config file value if the value was
not passed in on the command line (or is the zero value or default value
for the option).
I'll be honest, I feel a little dirty about this implementation since
I had to copy string constants out of struct tags. Not very DRY of me.
That said, there was no obvious way to get the default value of a given
option. If I missed something, happy to have this corrected, but I've
tested it and it seems to be doing the things it should be doing.
* Update v3 changelog
* Fix SetBackgroundColour on Windows
Update Chromium window color on calls to SetBackgroundColour.
* update changelog
* v3.0.0-alpha.23
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Correct nfpm.yaml template package dependencies.
As is, the `nfpm.yaml` template pulls in `-dev` versions of the packages the built Wails application actually relies on, in addition to `build-essential`. Which will work, but is way overkill. This PR corrects this.
I have tested this on an Ubuntu 22.04 VM and a Rocky Linux 10 VM, *(which actually necessitated attaching the EPEL repository)* but I did not verify Arch beyond looking up packages.
Additionally, it appears that the package name for RPM distro family is not in tune with the rest of them, referring to an earlier version of webkit2gtk, which has also been corrected.
**P.S.** Could we supply our own templates or updatable build files pretty please?
* Addressing points brought up.
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>