-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
fix(Windows): ensure WS_CAPTION is set on undecorated windows #862
Conversation
I have updated your lock dirs and formatted the code. |
Awesome find, Zach! |
HWND window = (HWND)win; | ||
int current_style = GetWindowLong(window, GWL_STYLE); | ||
SetWindowLong(window, GWL_STYLE, current_style | WS_CAPTION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth adding a link to that chrome source URL you found: https://chromium.googlesource.com/chromium/src.git/+/46.0.2478.0/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc#71
@CrossR I fixed that issue you mentioned in onivim/oni2#1823 about the window being maximized on start. Check this out locally and see if this fixes it! |
Tested with your Oni2 PR again and it looks like its working now! Thanks again for the fix! |
I don't know if minimize from taskbar is not allowed by default on undecorated windows, but I suppose that can be modified by end user(developer) on his own if he/she wishes to do. As shown in the GIF above, if you also add SysMenu and MinimizeBox styles |
People in the Oni Discord were noting that an undecorated Window was covering the taskbar on Windows. Luckily, I found that Chrome had that same problem: https://chromium.googlesource.com/chromium/src.git/+/46.0.2478.0/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc#71
This fixes that by adding an
Revery_Native.initWindow
function that sets the flag after all the SDL modifications are done.This also renames
Revery_Native
'sinit
toinitApp
to avoid confusion.