diff options
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/native_widget_win.cc | 3 | ||||
-rw-r--r-- | views/widget/widget_delegate.cc | 4 | ||||
-rw-r--r-- | views/widget/widget_delegate.h | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc index d7b75c5..cd6fc64 100644 --- a/views/widget/native_widget_win.cc +++ b/views/widget/native_widget_win.cc @@ -1285,7 +1285,8 @@ LRESULT NativeWidgetWin::OnSetText(const wchar_t* text) { } void NativeWidgetWin::OnSettingChange(UINT flags, const wchar_t* section) { - if (!GetParent() && (flags == SPI_SETWORKAREA)) { + if (!GetParent() && (flags == SPI_SETWORKAREA) && + !GetWidget()->widget_delegate()->WillProcessWorkAreaChange()) { // Fire a dummy SetWindowPos() call, so we'll trip the code in // OnWindowPosChanging() below that notices work area changes. ::SetWindowPos(GetNativeView(), 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | diff --git a/views/widget/widget_delegate.cc b/views/widget/widget_delegate.cc index fa91e7b..e63cbbb 100644 --- a/views/widget/widget_delegate.cc +++ b/views/widget/widget_delegate.cc @@ -144,5 +144,9 @@ NonClientFrameView* WidgetDelegate::CreateNonClientFrameView() { return NULL; } +bool WidgetDelegate::WillProcessWorkAreaChange() const { + return false; +} + } // namespace views diff --git a/views/widget/widget_delegate.h b/views/widget/widget_delegate.h index dac0253..0e34e5b 100644 --- a/views/widget/widget_delegate.h +++ b/views/widget/widget_delegate.h @@ -144,6 +144,12 @@ class WidgetDelegate { // Return NULL to use the default one. virtual NonClientFrameView* CreateNonClientFrameView(); + // Returns true if the window can be notified with the work area change. + // Otherwise, the work area change for the top window will be processed by + // the default window manager. In some cases, like panel, we would like to + // manage the positions by ourselves. + virtual bool WillProcessWorkAreaChange() const; + Window* window() const { return window_; } protected: |