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

[Windows] Make "borderless" and "on top" window styles function as expected #815

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

zshoals
Copy link
Contributor

@zshoals zshoals commented Oct 3, 2023

Previously, the borderless window mode was a bit janky and the on top window mode didn't function at all. This fix patches a couple of related problems up:

  • Borderless window now works at window creation (WS_POPUP enables this)
  • The borderless flag now supersedes the resizable flag (previously, both flags present would force the border to appear anyway). IMO borderless is the more "severe" setting so this seems right to me, although this does disable resizing with both flags enabled.
  • The on top flag actually functions now. It's special cased because despite a dedicated WS_EX_* flag that works at window creation, SetWindowLong ignores it (I checked, doesn't work) and it must be updated with SetWindowPos.
  • Fixed kinc_window_change_features not reliably working anyway because changes to the window frame require a call to SetWindowPos.

Notes:

  • Borderless mode previously wouldn't work at startup but worked with a call to kinc_window_change_features even without WS_POPUP anywhere and without a SetWindowPos call. I really wasn't able to figure out why this was the case.

@RobDangerous RobDangerous merged commit 25e1e6b into Kode:main Oct 3, 2023
20 checks passed
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.

2 participants