summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 03:38:38 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 03:38:38 +0000
commit765166d518aa40366f7075a7a378d7bec73c6433 (patch)
treef318a091594ffe7eff8ac3db09f8b78138178d73 /ui
parent3432f7fdc2f48d7bfadcdc95153b5a7a3b4a10b8 (diff)
downloadchromium_src-765166d518aa40366f7075a7a378d7bec73c6433.zip
chromium_src-765166d518aa40366f7075a7a378d7bec73c6433.tar.gz
chromium_src-765166d518aa40366f7075a7a378d7bec73c6433.tar.bz2
Don't flash black in classic, or in the body in aero
Maintains the clear in the title bar so that DWM doesn't flash white in the non-client area. Don't clear the main content area despite the drawbacks for resize on Win8 because the black clear on a new window is too noticable because the NTP has a white background. TEST=new windows, new menus, and resizing on win7 classic, aero, and win8 R=sky@chromium.org BUG=177115,289095,290481 Review URL: https://chromiumcodereview.appspot.com/23842009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222978 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/win/hwnd_message_handler.cc15
-rw-r--r--ui/views/win/hwnd_message_handler.h3
2 files changed, 1 insertions, 17 deletions
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index db09f9d..ba8f446 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -393,8 +393,7 @@ HWNDMessageHandler::HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate)
can_update_layered_window_(true),
is_first_nccalc_(true),
autohide_factory_(this),
- id_generator_(0),
- did_gdi_clear_(false) {
+ id_generator_(0) {
}
HWNDMessageHandler::~HWNDMessageHandler() {
@@ -1376,18 +1375,6 @@ void HWNDMessageHandler::OnEnterSizeMove() {
}
LRESULT HWNDMessageHandler::OnEraseBkgnd(HDC dc) {
- if (!did_gdi_clear_) {
- // This is necessary (at least on Win8) to avoid white flashing in the
- // titlebar area around the minimize/maximize/close buttons.
- HDC dc = GetDC(hwnd());
- RECT client_rect;
- GetClientRect(hwnd(), &client_rect);
- HBRUSH brush = CreateSolidBrush(0);
- FillRect(dc, &client_rect, brush);
- DeleteObject(brush);
- ReleaseDC(hwnd(), dc);
- did_gdi_clear_ = true;
- }
// Needed to prevent resize flicker.
return 1;
}
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 902eec3..5ff3ffd 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -476,9 +476,6 @@ class VIEWS_EXPORT HWNDMessageHandler :
// Generates touch-ids for touch-events.
ui::SequentialIDGenerator id_generator_;
- // Necessary to avoid corruption on NC paint in Aero mode.
- bool did_gdi_clear_;
-
DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler);
};