summaryrefslogtreecommitdiffstats
path: root/chrome/common/win_util.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 19:09:07 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 19:09:07 +0000
commit8d439a694371cfdd95c0c03ff452c9096d3cc7f3 (patch)
tree14ef281438f753ded9d64d7475059fe95fb89a88 /chrome/common/win_util.cc
parent695225e97e2ea163dac3b63659c05eb36f94bfd9 (diff)
downloadchromium_src-8d439a694371cfdd95c0c03ff452c9096d3cc7f3.zip
chromium_src-8d439a694371cfdd95c0c03ff452c9096d3cc7f3.tar.gz
chromium_src-8d439a694371cfdd95c0c03ff452c9096d3cc7f3.tar.bz2
Make Chromium windows not hide auto-hide taskbars, take 2.
This is very similar to r10845, but also includes a regression fix for issue 8410, where locking and unlocking the screen would cause mispositioning of child content. BUG=20,8410 Review URL: http://codereview.chromium.org/42027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/win_util.cc')
-rw-r--r--chrome/common/win_util.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/common/win_util.cc b/chrome/common/win_util.cc
index 07a1b08..9569b00 100644
--- a/chrome/common/win_util.cc
+++ b/chrome/common/win_util.cc
@@ -28,6 +28,8 @@
namespace win_util {
+const int kAutoHideTaskbarThicknessPx = 2;
+
namespace {
// Enforce visible dialog box.
@@ -626,6 +628,16 @@ void CenterAndSizeWindow(HWND parent, HWND window, const SIZE& pref,
}
}
+bool EdgeHasAutoHideTaskbar(UINT edge, HMONITOR monitor) {
+ APPBARDATA taskbar_data = { 0 };
+ taskbar_data.cbSize = sizeof APPBARDATA;
+ taskbar_data.uEdge = edge;
+ HWND taskbar = reinterpret_cast<HWND>(SHAppBarMessage(ABM_GETAUTOHIDEBAR,
+ &taskbar_data));
+ return ::IsWindow(taskbar) &&
+ (MonitorFromWindow(taskbar, MONITOR_DEFAULTTONEAREST) == monitor);
+}
+
HANDLE GetSectionFromProcess(HANDLE section, HANDLE process, bool read_only) {
HANDLE valid_section = NULL;
DWORD access = STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ;