OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/win/hwnd_message_handler.h" | 5 #include "ui/views/win/hwnd_message_handler.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <oleacc.h> | 8 #include <oleacc.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 | 10 |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
562 break; | 562 break; |
563 case ui::SHOW_STATE_MAXIMIZED: | 563 case ui::SHOW_STATE_MAXIMIZED: |
564 native_show_state = SW_SHOWMAXIMIZED; | 564 native_show_state = SW_SHOWMAXIMIZED; |
565 break; | 565 break; |
566 case ui::SHOW_STATE_MINIMIZED: | 566 case ui::SHOW_STATE_MINIMIZED: |
567 native_show_state = SW_SHOWMINIMIZED; | 567 native_show_state = SW_SHOWMINIMIZED; |
568 break; | 568 break; |
569 case ui::SHOW_STATE_NORMAL: | 569 case ui::SHOW_STATE_NORMAL: |
570 native_show_state = SW_SHOWNORMAL; | 570 native_show_state = SW_SHOWNORMAL; |
571 break; | 571 break; |
572 case ui::SHOW_STATE_FULLSCREEN: | |
573 native_show_state = SW_SHOWNORMAL; | |
574 SetFullscreen(true); | |
sky
2015/05/19 04:20:04
I'm a bit nervous about invoking this before the w
joone
2015/05/19 17:40:49
When SetFullscreen is called after ShowWindow, we
| |
575 break; | |
572 default: | 576 default: |
573 native_show_state = delegate_->GetInitialShowState(); | 577 native_show_state = delegate_->GetInitialShowState(); |
574 break; | 578 break; |
575 } | 579 } |
576 | 580 |
577 ShowWindow(hwnd(), native_show_state); | 581 ShowWindow(hwnd(), native_show_state); |
578 // When launched from certain programs like bash and Windows Live Messenger, | 582 // When launched from certain programs like bash and Windows Live Messenger, |
579 // show_state is set to SW_HIDE, so we need to correct that condition. We | 583 // show_state is set to SW_HIDE, so we need to correct that condition. We |
580 // don't just change show_state to SW_SHOWNORMAL because MSDN says we must | 584 // don't just change show_state to SW_SHOWNORMAL because MSDN says we must |
581 // always first call ShowWindow with the specified value from STARTUPINFO, | 585 // always first call ShowWindow with the specified value from STARTUPINFO, |
(...skipping 2150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2732 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); | 2736 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); |
2733 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); | 2737 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); |
2734 } | 2738 } |
2735 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want | 2739 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want |
2736 // to notify our children too, since we can have MDI child windows who need to | 2740 // to notify our children too, since we can have MDI child windows who need to |
2737 // update their appearance. | 2741 // update their appearance. |
2738 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); | 2742 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); |
2739 } | 2743 } |
2740 | 2744 |
2741 } // namespace views | 2745 } // namespace views |
OLD | NEW |