Skip to content

Commit fb9d183

Browse files
committed
Reverted WS_EX_LAYERED change
1 parent 66c2496 commit fb9d183

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

BeefySysLib/platform/win/WinBFApp.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,8 @@ WinBFWindow::WinBFWindow(BFWindow* parent, const StringImpl& title, int x, int y
151151
mHMenuMap[aMenu->mMenu] = aMenu;
152152
mMenu = aMenu;
153153
}
154-
155-
// We used to set WS_EX_LAYERED here, but this can cause a very brief flicker of a window frame in the upper left
156-
// corner of the screen. This appears to be a Windows bug. Now we add this flag during SetAlpha
157-
int windowFlagsEx = 0;
154+
155+
int windowFlagsEx = WS_EX_LAYERED;
158156

159157
if (windowFlags & BFWINDOW_TOOLWINDOW)
160158
windowFlagsEx |= WS_EX_TOOLWINDOW;
@@ -1791,8 +1789,7 @@ void WinBFWindow::SetAlpha(float alpha, uint32 destAlphaSrcMask, bool isMouseVis
17911789
}
17921790
}
17931791
else
1794-
{
1795-
::SetWindowLong(mHWnd, GWL_EXSTYLE, ::GetWindowLong(mHWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
1792+
{
17961793
::SetLayeredWindowAttributes(mHWnd, 0, (int) (alpha * 255), LWA_ALPHA);
17971794
}
17981795
SetMouseVisible(isMouseVisible);

0 commit comments

Comments
 (0)