summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-25 15:56:30 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-25 15:56:30 +0000
commit9d1ae7314aa40c8cfbf426d0388045f1da5c85da (patch)
tree2bfbdeb6d02ae0a768fa6c2c1c5b40f8e6d1a312
parentbaaf80940b221830d51faee6a110e4ca28775d35 (diff)
downloadchromium_src-9d1ae7314aa40c8cfbf426d0388045f1da5c85da.zip
chromium_src-9d1ae7314aa40c8cfbf426d0388045f1da5c85da.tar.gz
chromium_src-9d1ae7314aa40c8cfbf426d0388045f1da5c85da.tar.bz2
Fix layered windows. use_layered_buffer_ was not being correctly intialized before LayoutRootView() was called in OnCreate().
Also remove unused opaque()/opaque_ member. http://crbug.com/74141 http://crbug.com/74126 TEST=see bugs TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76051 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--views/widget/widget_win.cc6
-rw-r--r--views/widget/widget_win.h5
2 files changed, 1 insertions, 10 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 145694a..78b6732 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -194,11 +194,6 @@ void WidgetWin::Init(gfx::NativeView parent, const gfx::Rect& bounds) {
if (!IsAccessibleWidget())
NotifyWinEvent(EVENT_SYSTEM_ALERT, hwnd(), OBJID_CUSTOM, CHILDID_SELF);
- // See if the style has been overridden.
- opaque_ = !(window_ex_style() & WS_EX_TRANSPARENT);
- use_layered_buffer_ = (use_layered_buffer_ &&
- !!(window_ex_style() & WS_EX_LAYERED));
-
default_theme_provider_.reset(new DefaultThemeProvider());
props_.push_back(SetWindowSupportsRerouteMouseWheel(hwnd()));
@@ -611,6 +606,7 @@ LRESULT WidgetWin::OnCreate(CREATESTRUCT* create_struct) {
// Widget::GetWidgetFromNativeView expects the contents of this property
// to be of type Widget, so the cast is necessary.
SetNativeWindowProperty(kWidgetKey, static_cast<Widget*>(this));
+ use_layered_buffer_ = !!(window_ex_style() & WS_EX_LAYERED);
LayoutRootView();
return 0;
}
diff --git a/views/widget/widget_win.h b/views/widget/widget_win.h
index 206b338..baaa5b3 100644
--- a/views/widget/widget_win.h
+++ b/views/widget/widget_win.h
@@ -468,9 +468,6 @@ class WidgetWin : public ui::WindowImpl,
// create specialized RootView implementations.
virtual RootView* CreateRootView();
- // Returns true if this WidgetWin is opaque.
- bool opaque() const { return opaque_; }
-
// The TooltipManager.
// WARNING: RootView's destructor calls into the TooltipManager. As such, this
// must be destroyed AFTER root_view_.
@@ -538,8 +535,6 @@ class WidgetWin : public ui::WindowImpl,
// used when tracking is canceled.
DWORD active_mouse_tracking_flags_;
- bool opaque_;
-
// Should we keep an offscreen buffer? This is initially true and if the
// window has WS_EX_LAYERED then it remains true. You can set this to false
// at any time to ditch the buffer, and similarly set back to true to force