From ca0bfc7ae7eb3c4ecf62a34f659714f5e8cbf897 Mon Sep 17 00:00:00 2001 From: "johnnyg@chromium.org" Date: Fri, 23 Apr 2010 22:31:16 +0000 Subject: Add a widget delegate handler for the WM_SETTINGCHANGE message in windows. This is sent when the size/position of the taskbar changes, and we need to move the desktop notifications if that happens. BUG=35464 TEST=open notifications and move taskbar Review URL: http://codereview.chromium.org/1622018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45504 0039d316-1c4b-4281-b951-d872f2087c98 --- views/widget/widget_delegate.h | 4 ++++ views/widget/widget_win.cc | 2 ++ 2 files changed, 6 insertions(+) (limited to 'views/widget') diff --git a/views/widget/widget_delegate.h b/views/widget/widget_delegate.h index 4607376..41fd4db 100644 --- a/views/widget/widget_delegate.h +++ b/views/widget/widget_delegate.h @@ -15,6 +15,10 @@ class WidgetDelegate { // Called with the display changes (color depth or resolution). virtual void DisplayChanged() = 0; + + // Called when the work area (the desktop area minus taskbars, + // menubars, etc.) changes in size. + virtual void WorkAreaChanged() = 0; }; } // namespace views diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc index 84aece0..c88e218 100644 --- a/views/widget/widget_win.cc +++ b/views/widget/widget_win.cc @@ -889,6 +889,8 @@ LRESULT WidgetWin::OnSetText(const wchar_t* text) { } void WidgetWin::OnSettingChange(UINT flags, const wchar_t* section) { + if (flags == SPI_SETWORKAREA && GetWidgetDelegate()) + GetWidgetDelegate()->WorkAreaChanged(); SetMsgHandled(FALSE); } -- cgit v1.1