Fix transparent window with decorations (#1011)

* Fix transparent window with decorations

* To changelog, added fix for transparent decorated windows.
This commit is contained in:
Bradley Smith 2019-07-06 10:29:15 -07:00 committed by Osspial
parent 7d3ff3d2d9
commit 28775be115
2 changed files with 4 additions and 2 deletions

View file

@ -13,6 +13,7 @@ and `WindowEvent::HoveredFile`.
- On Windows, fix edge case where `RedrawRequested` could be dispatched before input events in event loop iteration.
- On Windows, fix timing issue that could cause events to be improperly dispatched after `RedrawRequested` but before `EventsCleared`.
- On macOS, drop unused Metal dependency.
- On Windows, fix the trail effect happening on transparent decorated windows. Borderless (or un-decorated) windows were not affected.
- On Windows, fix `with_maximized` not properly setting window size to entire window.
# 0.20.0 Alpha 1

View file

@ -219,8 +219,9 @@ impl WindowFlags {
if self.contains(WindowFlags::NO_BACK_BUFFER) {
style_ex |= WS_EX_NOREDIRECTIONBITMAP;
}
// if self.contains(WindowFlags::TRANSPARENT) {
// }
if self.contains(WindowFlags::TRANSPARENT) && self.contains(WindowFlags::DECORATIONS) {
style_ex |= WS_EX_LAYERED;
}
if self.contains(WindowFlags::CHILD) {
style |= WS_CHILD; // This is incompatible with WS_POPUP if that gets added eventually.
}