Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frameless Window with curved corners showing square border on macOS #3984

Open
petergmurphy opened this issue Jan 5, 2025 · 0 comments
Open
Labels
Bug Something isn't working

Comments

@petergmurphy
Copy link

Description

NOTE: Specific to macOS.

My application requires the main window to resize depending on the number of suggestions shown.
The number of suggestions shown changes as the user types text into the input element. When the window resizes, sometimes a border outline is visible beside the window's curved corners. It seems to only appear when resizing the window to a smaller height.

To Reproduce

  1. Keep programmatically resizing a frameless, transparent window which has CSS border radius applied.
  • In my case, on pressing a key which shows suggestions.
  1. It will eventually show the outline of the window's border. It goes away on a subsequent resize

This unexpected behavior only occurs maybe once every 10-50 resizes (infrequent) and when resizing the window to a smaller height.

Minimal example codebase: https://github.com/petergmurphy/wails-window-bug
link to specific file were resizing takes place: https://github.com/petergmurphy/wails-window-bug/blob/main/frontend/src/App.tsx

Expected behaviour

The window border outline should never appear, I have only seen this occur on macOS.

Screenshots

wails_resize_bug.mp4

image

From minimal example application:

image

Attempted Fixes

Things I have tried:

  • Toggling a combination of Frameless and Mac specific Wails app settings.
  • Adding debouncing for resizing to a smaller height.
  • Refactoring frontend code.

I am more than happy to try and fix the problem myself in terms of making changes and submitting a pull request.

I just wanted to bring this to the attention of the maintainers to see if there is a simpler fix.

System Details

# Wails
Version | v2.9.2

# System
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | MacOS                                                                                                                       |
| Version      | 15.1.1                                                                                                                      |
| ID           | 24B91                                                                                                                       |
| Go Version   | go1.22.5                                                                                                                    |
| Platform     | darwin                                                                                                                      |
| Architecture | arm64                                                                                                                       |
| CPU          | Apple M3 Max                                                                                                                |
| GPU          | Chipset Model: Apple M3 Max Type: GPU Bus: Built-In Total Number of Cores: 30 Vendor: Apple (0x106b) Metal Support: Metal 3 |
| Memory       | 36GB                                                                                                                        |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────┐
| Dependency                | Package Name | Status    | Version |
| Xcode command line tools  | N/A          | Installed | 2409    |
| Nodejs                    | N/A          | Installed | 20.11.1 |
| npm                       | N/A          | Installed | 10.2.4  |
| *Xcode                    | N/A          | Available |         |
| *upx                      | N/A          | Available |         |
| *nsis                     | N/A          | Available |         |
└─────────────────── * - Optional Dependency ────────────────────┘

# Diagnosis
Optional package(s) installation details:
  - Xcode: Available at https://apps.apple.com/us/app/xcode/id497799835
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

Additional context

No response

@petergmurphy petergmurphy added the Bug Something isn't working label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant