Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: views/widget/native_widget_win.cc

Issue 7248018: Fix the issue that a panel window cannot be shrink to very small (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_win.cc
===================================================================
--- views/widget/native_widget_win.cc (revision 98900)
+++ views/widget/native_widget_win.cc (working copy)
@@ -2024,6 +2024,18 @@
window_pos->flags &= ~SWP_SHOWWINDOW;
}
+ // When WM_WINDOWPOSCHANGING message is handled by DefWindowProc, it will
+ // enforce (cx, cy) not to be smaller than (6, 6) for any non-popup window.
+ // We work around this by changing cy back to our intended value.
+ if (!GetParent() && ~(window_pos->flags & SWP_NOSIZE) && window_pos->cy < 6) {
+ LONG old_cy = window_pos->cy;
+ DefWindowProc(GetNativeView(), WM_WINDOWPOSCHANGING, 0,
+ reinterpret_cast<LPARAM>(window_pos));
+ window_pos->cy = old_cy;
+ SetMsgHandled(TRUE);
+ return;
+ }
+
SetMsgHandled(FALSE);
}
@@ -2056,7 +2068,7 @@
gfx::Insets NativeWidgetWin::GetClientAreaInsets() const {
// Returning an empty Insets object causes the default handling in
// NativeWidgetWin::OnNCCalcSize() to be invoked.
- if (!GetWidget()->non_client_view() || GetWidget()->ShouldUseNativeFrame())
+ if (GetWidget()->ShouldUseNativeFrame())
return gfx::Insets();
if (IsMaximized()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698