Chromium Code Reviews| Index: ui/views/win/hwnd_message_handler.cc |
| diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc |
| index 76818369d93dce38782d3d3315b9300762886c74..253829cb01e249dba04cb33dede6732100e6a0fe 100644 |
| --- a/ui/views/win/hwnd_message_handler.cc |
| +++ b/ui/views/win/hwnd_message_handler.cc |
| @@ -533,7 +533,10 @@ void HWNDMessageHandler::SetRegion(HRGN region) { |
| } |
| void HWNDMessageHandler::StackAbove(HWND other_hwnd) { |
| - SetWindowPos(hwnd(), other_hwnd, 0, 0, 0, 0, |
| + // Find a window above |other_hwnd|. If it exists, place hwnd() behind it. |
|
sky
2015/06/05 15:27:41
This comment just describes what the code is doing
vasilii
2015/06/05 15:37:26
Done.
|
| + // Otherwise, make hwnd() a top window. |
| + HWND next_window = GetNextWindow(other_hwnd, GW_HWNDPREV); |
|
sky
2015/06/05 15:27:41
DCHECK(other_hwnd)
vasilii
2015/06/05 15:37:26
Done.
|
| + SetWindowPos(hwnd(), next_window ? next_window : HWND_TOP, 0, 0, 0, 0, |
| SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); |
| } |