-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
win32: add an option to control window title bar state #11469
Conversation
cd8eff9
to
7846832
Compare
Yes, there is a border. DMW makes left, right and bottom border invisible, but it is there, just it is visible on top. This is just how Windows works, but we can reduce top window border size to imitate DWM invisible borders. I've added a commit. One side effect is that border grab area is different on top, because simply the border itself is smaller, compared to others. I think for app like mpv it make sense to reduce top border size, so I made the change.
Good catch. I missed the dynamic settings update check. Fixed now. EDIT: There is one issue with resizing, that's why I'm reluctant with adjusting top border width, it needs to be accounted for in all places... and it is annoying. |
Just for visibility of progress. I have this patch working as intended, but while testing I notices few more issues with window sizing and I need to fix those first... and this needs motivation to fight with winapi ;p Fixes for #7192 and #11486 above other things that I noticed and don't have specific issues reported. |
Rebased and as a bonus added |
363fe8e
to
62ae6fb
Compare
Windows builds are available here, if anyone wants to try https://github.com/mpv-player/mpv/actions/runs/5932869185 |
9074871
to
af3ff18
Compare
Border looks pretty good now 👍. But no transition animation when |
What animation? Anyway I don't think I can do anything here, if there is no animation without |
2023-08-22.220652.mp4https://github.com/melak47/BorderlessWindow This demo works as I expect, using |
Nah, it completely disables non-client area drawing by DWM, with a shadow restore. But there is no window outline and the shadow is not visible in fact. I guess I can enable |
@natural-harmonia-gropius Try this version, should be fine now. As a bonus we don't have to ask DWM. Hopefully, our geometry is correct ;p |
Everything works perfectly to me. Thank you so much! |
Thanks for test. I guess it is ready for review and merge now. |
I'm eagerly waiting for this to be merged. |
3f7c375
to
1403362
Compare
a1219f7
to
93469bc
Compare
93469bc
to
3109ce5
Compare
Download the artifacts for this pull request: |
3109ce5
to
c6170ed
Compare
DWM makes part of left, right and bottom border invisible.
Fixes too small initial window size.
Allows to set preference for window corners rounding for DWM.
I don't think in fullscreen mode it makes sense to enable rounded corners. We can add another option if someone needs it, but for now `window_corners` affects only the window as one would expect.
Apparently removing WS_CAPTION disables some window animations. Instead adjust non-client area to not draw title bar. Note that we do not account for difference in real border size and invisible one, but seems to work correctly.
c6170ed
to
b521dd4
Compare
No description provided.