Skip to content

✨ Add rounded corners for main window on Windows and Linux#4006

Merged
guiyanakuang merged 5 commits intomainfrom
feat/issue-4005-rounded-corners-windows-linux
Mar 9, 2026
Merged

✨ Add rounded corners for main window on Windows and Linux#4006
guiyanakuang merged 5 commits intomainfrom
feat/issue-4005-rounded-corners-windows-linux

Conversation

@guiyanakuang
Copy link
Copy Markdown
Member

Closes #4005

Summary

  • Windows 11+: Use DWM API DWMWA_WINDOW_CORNER_PREFERENCE with DWMWCP_ROUND to request native rounded corners from the Desktop Window Manager
  • Linux: Use AWT window.setShape(RoundRectangle2D) to clip the undecorated window to a rounded rectangle, with a ComponentListener to reapply on resize
  • Add DWMWA_WINDOW_CORNER_PREFERENCE and DWMWCP_* constants to Dwmapi.kt

Test plan

  • Verify rounded corners appear on Windows 11
  • Verify rounded corners appear on Linux (X11/Wayland)
  • Verify no regression on macOS (native rounded corners unchanged)
  • Verify Windows 10 does not crash (DWM call is silently ignored)

@guiyanakuang guiyanakuang merged commit c7d7a9e into main Mar 9, 2026
2 checks passed
@guiyanakuang guiyanakuang deleted the feat/issue-4005-rounded-corners-windows-linux branch March 9, 2026 09:08
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.

Main window lacks rounded corners on Windows and Linux

1 participant