diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 01:12:49 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 01:12:49 +0000 |
commit | 2c4f5143cffe615185e9de9c81ea748ce82e6777 (patch) | |
tree | e2930ed3f48cd0c1f361f2db91dafb7e3052454f /chrome/views | |
parent | ae047d1b5b5e4bc5e4f31e8208f906d46994b7e6 (diff) | |
download | chromium_src-2c4f5143cffe615185e9de9c81ea748ce82e6777.zip chromium_src-2c4f5143cffe615185e9de9c81ea748ce82e6777.tar.gz chromium_src-2c4f5143cffe615185e9de9c81ea748ce82e6777.tar.bz2 |
Bringing the Task Manager to the front shouldn't cause it to lose topmost status.
Original patch by Kim Christensen (see http://codereview.chromium.org/28150 ), r=me,brettw, tweaked slightly.
BUG=7227
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r-- | chrome/views/widget_win.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/views/widget_win.cc b/chrome/views/widget_win.cc index fea61da..9568a64 100644 --- a/chrome/views/widget_win.cc +++ b/chrome/views/widget_win.cc @@ -241,7 +241,13 @@ void WidgetWin::MoveToFront(bool should_activate) { if (!should_activate) { flags |= SWP_NOACTIVATE; } - SetWindowPos(HWND_NOTOPMOST, 0, 0, 0, 0, flags); + + // Keep the window topmost if it was already topmost. + WINDOWINFO wi; + wi.cbSize = sizeof WINDOWINFO; + GetWindowInfo(GetHWND(), &wi); + SetWindowPos((wi.dwExStyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_NOTOPMOST, + 0, 0, 0, 0, flags); } HWND WidgetWin::GetHWND() const { |