win: Don't change transparent window's style

Close #1952.
This commit is contained in:
Cheng Zhao 2016-01-06 23:02:33 +08:00
Родитель 0c287d0424
Коммит 3ca5b0ce23
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -424,12 +424,14 @@ void NativeWindowViews::SetResizable(bool resizable) {
// WS_MAXIMIZEBOX => Maximize button
// WS_MINIMIZEBOX => Minimize button
// WS_THICKFRAME => Resize handle
DWORD style = ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE);
if (resizable)
style |= WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_THICKFRAME;
else
style = (style & ~(WS_MAXIMIZEBOX | WS_THICKFRAME)) | WS_MINIMIZEBOX;
::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, style);
if (!transparent()) {
DWORD style = ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE);
if (resizable)
style |= WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_THICKFRAME;
else
style = (style & ~(WS_MAXIMIZEBOX | WS_THICKFRAME)) | WS_MINIMIZEBOX;
::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, style);
}
#elif defined(USE_X11)
if (resizable != resizable_) {
// On Linux there is no "resizable" property of a window, we have to set