| 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..75d93af08e8c98c0d779150dd3d23939dbc7bf53 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,
|
| + // Windows API allows to stack behind another windows only.
|
| + DCHECK(other_hwnd);
|
| + HWND next_window = GetNextWindow(other_hwnd, GW_HWNDPREV);
|
| + SetWindowPos(hwnd(), next_window ? next_window : HWND_TOP, 0, 0, 0, 0,
|
| SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
|
| }
|
|
|
|
|