Fix Windows min/max animation on frameless windows
- Frameless windows disappeared or appears when minimized and maximized on Windows. This commit fixes that.
This commit is contained in:
parent
edcae49e52
commit
4b20ac3dc6
1 changed files with 7 additions and 0 deletions
|
@ -226,6 +226,13 @@ NativeWindowViews::NativeWindowViews(content::WebContents* web_contents,
|
|||
options.Get(switches::kUseContentSize, &use_content_size_) &&
|
||||
use_content_size_)
|
||||
bounds = ContentBoundsToWindowBounds(bounds);
|
||||
#if defined(OS_WIN)
|
||||
else {
|
||||
// set Window style so that we get a minimize and maximize animation when frameless
|
||||
DWORD frame_style = WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CAPTION;
|
||||
::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style);
|
||||
}
|
||||
#endif
|
||||
|
||||
window_->UpdateWindowIcon();
|
||||
window_->CenterWindow(bounds.size());
|
||||
|
|
Loading…
Add table
Reference in a new issue