Commit 585e1331 authored by jeremya@chromium.org's avatar jeremya@chromium.org

Fixed: on windows, fixed-size app windows would lose their shadows.

Some code checked the resizability of the window and used it to key a change in
window style. For app windows, we always want a very particular window style,
so we check for the remove_standard_frame Widget::InitParams option and ignore
the resize flag.

Also, change the shell window NonClientHitTest code to not return HTTOPLEFT and
friends when the window is non-resizable.

R=ben@chromium.org
BUG=155219


Review URL: https://chromiumcodereview.appspot.com/11154007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162387 0039d316-1c4b-4281-b951-d872f2087c98
parent 8e10edb4
......@@ -194,6 +194,7 @@ int ShellWindowFrameView::NonClientHitTest(const gfx::Point& point) {
bool can_ever_resize = frame_->widget_delegate() ?
frame_->widget_delegate()->CanResize() :
false;
if (can_ever_resize) {
// Don't allow overlapping resize handles when the window is maximized or
// fullscreen, as it can't be resized in those states.
int resize_border =
......@@ -207,6 +208,7 @@ int ShellWindowFrameView::NonClientHitTest(const gfx::Point& point) {
can_ever_resize);
if (frame_component != HTNOWHERE)
return frame_component;
}
// Check for possible draggable region in the client area for the frameless
// window.
......
......@@ -60,7 +60,7 @@ void CalculateWindowStylesFromInitParams(
bool can_maximize = widget_delegate->CanMaximize();
if (can_maximize) {
*style |= WS_OVERLAPPEDWINDOW;
} else if (can_resize) {
} else if (can_resize || params.remove_standard_frame) {
*style |= WS_OVERLAPPED | WS_THICKFRAME;
}
if (native_widget_delegate->IsDialogBox()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment