Skip to content

Conversation

@rodrigorc
Copy link
Contributor

@rodrigorc rodrigorc commented Sep 14, 2025

In Windows, an overlapped window that used with_decorations(false) didn't have the proper styles.

Previously, between other flags it removed WS_CAPTION but only for child windows.

That doesn't actually make sense, because WS_CAPTION is intended for overlapped (non-child) windows only. Actually its numeric value is equal to WS_BORDER | WS_DLGFRAME:

#define WS_CAPTION __MSABI_LONG(0x00C00000)
#define WS_BORDER __MSABI_LONG(0x00800000)
#define WS_DLGFRAME __MSABI_LONG(0x00400000)

That is why removing it actually removes the decoration of child windows (WS_BORDER).

Anyway, trying to create a secondary overlapped window without decorations doesn't work, I think because the styles are not actually removed, but the inner/outer metrics is fixed as if it were.

With this change the decorations are removed both for child and overlapped windows.

  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

In Windows, an overlapped window that used
`with_decorations(false)` didn't have the
proper styles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant