summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS3
-rw-r--r--chrome/views/widget_win.cc8
2 files changed, 9 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index ea40fd9..b84213c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -28,4 +28,5 @@ Joshua Roesslein <jroesslein@gmail.com>
Yong Shin <sy3620@gmail.com>
Laszlo Radanyi <bekkra@gmail.com>
Raman Tenneti <raman.tenneti@gmail.com>
-Kyle Nahrgang <kpn24@drexel.edu> \ No newline at end of file
+Kyle Nahrgang <kpn24@drexel.edu>
+Kim Christensen <kimworking@gmail.com> \ No newline at end of file
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 {