summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 22:31:16 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 22:31:16 +0000
commitca0bfc7ae7eb3c4ecf62a34f659714f5e8cbf897 (patch)
tree776c46a09ab65c5225f66554046dcd6eacfd1540 /views/widget
parente83a7f61f212487d7da91206583feff16f8637a0 (diff)
downloadchromium_src-ca0bfc7ae7eb3c4ecf62a34f659714f5e8cbf897.zip
chromium_src-ca0bfc7ae7eb3c4ecf62a34f659714f5e8cbf897.tar.gz
chromium_src-ca0bfc7ae7eb3c4ecf62a34f659714f5e8cbf897.tar.bz2
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
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/widget_delegate.h4
-rw-r--r--views/widget/widget_win.cc2
2 files changed, 6 insertions, 0 deletions
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);
}