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 49ccb977a5e906e229dace0237cf90072539ed8a..8f5d189d3f02e13646f653a4be02caec7851597e 100644 |
| --- a/ui/views/win/hwnd_message_handler.cc |
| +++ b/ui/views/win/hwnd_message_handler.cc |
| @@ -598,6 +598,9 @@ void HWNDMessageHandler::ShowWindowWithState(ui::WindowShowState show_state) { |
| case ui::SHOW_STATE_MINIMIZED: |
| native_show_state = SW_SHOWMINIMIZED; |
| break; |
| + case ui::SHOW_STATE_NORMAL: |
| + native_show_state = SW_SHOWNORMAL; |
| + break; |
| default: |
| native_show_state = delegate_->GetInitialShowState(); |
| break; |
| @@ -633,6 +636,11 @@ void HWNDMessageHandler::ShowMaximizedWithBounds(const gfx::Rect& bounds) { |
| placement.showCmd = SW_SHOWMAXIMIZED; |
| placement.rcNormalPosition = bounds.ToRECT(); |
| SetWindowPlacement(hwnd(), &placement); |
| + |
| + // We need to explicitly activate the window, because if we're opened from a |
| + // desktop shortcut while an existing window is already running it doesn't |
| + // seem to be enough to use SW_SHOWMAXIMIZED to activate the window. |
| + Activate(); |
|
sky
2014/11/24 16:23:07
I think you're working around a problem that may b
Tomasz Moniuszko
2014/11/27 15:35:50
No it doesn't because Activate() is being called f
sky
2014/12/01 17:11:45
Ah, ok, I get it.
|
| } |
| void HWNDMessageHandler::Hide() { |