wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.37k stars 1.22k forks source link

Issue with setFrameless Function Not Enabling Window Frame on First Call #3690

Closed bruxaodev closed 2 months ago

bruxaodev commented 3 months ago

Description

I encountered an issue with the setFrameless function when trying to toggle the window frame on and off. Specifically, when a window is opened in frameless mode and I attempt to add the frame back using setFrameless(false), the frame does not appear on the first call. I need to disable and then re-enable the frame for it to be applied correctly.

To Reproduce

  1. Open a window in frameless mode by calling setFrameless(true).
  2. Attempt to add the frame back by calling setFrameless(false).
  3. Observe that the window frame does not appear.

Expected behaviour

The window frame should be applied on the first call to setFrameless(false).

Screenshots

overlay-bug

Attempted Fixes

No response

System Details

# System
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
| Name              | Windows 10 Pro                                                          |
| Version           | 2009 (Build: 22621)                                                     |
| ID                | 22H2                                                                    |
| Branding          | Windows 11 Pro                                                          |
| Platform          | windows                                                                 |
| Architecture      | amd64                                                                   |
| Go WebView2Loader | true                                                                    |
| WebView2 Version  | 127.0.2651.105                                                          |
| CPU               | Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz                               |
| GPU 1             | Meta Virtual Monitor (Meta Inc.) - Driver: 17.12.55.198                 |
| GPU 2             | Virtual Desktop Monitor (Virtual Desktop, Inc.) - Driver: 10.54.50.446  |
| GPU 3             | NVIDIA GeForce RTX 3060 (NVIDIA) - Driver: 32.0.15.5599                 |
| Memory            | 32GB                                                                    |
└─────────────────────────────────────────────────────────────────────────────────────────────┘

# Build Environment
┌─────────────────────────────────────────────────────────┐
| Wails CLI    | v3.0.0-alpha.6                           |
| Go Version   | go1.22.5                                 |
| Revision     | c79461b481fc2463ee21d96b316e53168248fd7c |
| Modified     | true                                     |
| -buildmode   | exe                                      |
| -compiler    | gc                                       |
| CGO_CFLAGS   |                                          |
| CGO_CPPFLAGS |                                          |
| CGO_CXXFLAGS |                                          |
| CGO_ENABLED  | 1                                        |
| CGO_LDFLAGS  |                                          |
| GOAMD64      | v1                                       |
| GOARCH       | amd64                                    |
| GOOS         | windows                                  |
| vcs          | git                                      |
| vcs.modified | true                                     |
| vcs.revision | c79461b481fc2463ee21d96b316e53168248fd7c |
| vcs.time     | 2024-08-10T03:13:18Z                     |
└─────────────────────────────────────────────────────────┘

# Dependencies
┌───────────────────────────┐
| npm  | 10.2.4             |
| NSIS | Not Installed      |
└─ * - Optional Dependency ─┘

# Diagnosis
 SUCCESS  Your system is ready for Wails development!

Additional context

No response