diff options
-rw-r--r-- | AUTHORS | 3 | ||||
-rw-r--r-- | chrome/views/widget_win.cc | 8 |
2 files changed, 9 insertions, 2 deletions
@@ -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 { |