Index: chrome/views/widget_win.cc |
=================================================================== |
--- chrome/views/widget_win.cc (revision 10469) |
+++ chrome/views/widget_win.cc (working copy) |
@@ -241,7 +241,15 @@ |
if (!should_activate) { |
flags |= SWP_NOACTIVATE; |
} |
- SetWindowPos(HWND_NOTOPMOST, 0, 0, 0, 0, flags); |
+ |
+ // Check if the window is topmost. |
+ WINDOWINFO wi; |
+ wi.cbSize = sizeof(WINDOWINFO); |
+ GetWindowInfo(GetHWND(), &wi); |
+ if ((wi.dwExStyle & WS_EX_TOPMOST) > 0) |
+ SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0, flags); |
+ else |
+ SetWindowPos(HWND_NOTOPMOST, 0, 0, 0, 0, flags); |
} |
HWND WidgetWin::GetHWND() const { |