windisplay: Fix parented window receiving WS_POPUP style

Fixes #915
This commit is contained in:
rdb 2020-09-12 15:38:50 +02:00
parent ce4690b869
commit a968caf1d2

View File

@ -973,17 +973,25 @@ make_style(const WindowProperties &properties) {
// Additionally, the window class attribute should not include the // Additionally, the window class attribute should not include the
// CS_PARENTDC style. // CS_PARENTDC style.
DWORD window_style = WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; DWORD window_style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
if (properties.get_fullscreen()) { if (properties.get_fullscreen()) {
window_style |= WS_SYSMENU; window_style |= WS_POPUP | WS_SYSMENU;
} else if (!properties.get_undecorated()) { } else {
window_style |= (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX); if (_parent_window_handle) {
window_style |= WS_CHILD;
if (!properties.get_fixed_size()) {
window_style |= (WS_SIZEBOX | WS_MAXIMIZEBOX);
} else { } else {
window_style |= WS_BORDER; window_style |= WS_POPUP;
}
if (!properties.get_undecorated()) {
window_style |= (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX);
if (!properties.get_fixed_size()) {
window_style |= (WS_SIZEBOX | WS_MAXIMIZEBOX);
} else {
window_style |= WS_BORDER;
}
} }
} }
return window_style; return window_style;