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

Unified Diff: chrome/views/window.cc

Issue 42060: Merge r11401.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/169/src/
Patch Set: Created 11 years, 9 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 | « chrome/views/window.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window.cc
===================================================================
--- chrome/views/window.cc (revision 11416)
+++ chrome/views/window.cc (working copy)
@@ -324,7 +324,8 @@
is_active_(false),
lock_updates_(false),
saved_window_style_(0),
- saved_maximized_state_(0) {
+ saved_maximized_state_(0),
+ force_hidden_(false) {
InitClass();
DCHECK(window_delegate_);
window_delegate_->window_.reset(this);
@@ -649,8 +650,10 @@
void Window::OnNCPaint(HRGN rgn) {
// We only do non-client painting if we're not using the native frame.
- if (non_client_view_->UseNativeFrame())
- return WidgetWin::OnNCPaint(rgn);
+ if (non_client_view_->UseNativeFrame()) {
+ WidgetWin::OnNCPaint(rgn);
+ return;
+ }
// We have an NC region and need to paint it. We expand the NC region to
// include the dirty region of the root view. This is done to minimize
@@ -916,6 +919,15 @@
}
}
+void Window::OnWindowPosChanging(WINDOWPOS* window_pos) {
+ if (force_hidden_) {
+ // Prevent the window from being made visible if we've been asked to do so.
+ // See comment in header as to why we might want this.
+ window_pos->flags &= ~SWP_SHOWWINDOW;
+ }
+ WidgetWin::OnWindowPosChanging(window_pos);
+}
+
////////////////////////////////////////////////////////////////////////////////
// Window, private:
« no previous file with comments | « chrome/views/window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698