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/widget/native_widget_win.h" | 5 #include "ui/views/widget/native_widget_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 | 627 |
628 InputMethod* NativeWidgetWin::GetInputMethod() { | 628 InputMethod* NativeWidgetWin::GetInputMethod() { |
629 return GetWidget()->GetInputMethodDirect(); | 629 return GetWidget()->GetInputMethodDirect(); |
630 } | 630 } |
631 | 631 |
632 gfx::NativeViewAccessible NativeWidgetWin::GetNativeViewAccessible() { | 632 gfx::NativeViewAccessible NativeWidgetWin::GetNativeViewAccessible() { |
633 return GetWidget()->GetRootView()->GetNativeViewAccessible(); | 633 return GetWidget()->GetRootView()->GetNativeViewAccessible(); |
634 } | 634 } |
635 | 635 |
636 void NativeWidgetWin::HandleAppDeactivated() { | 636 void NativeWidgetWin::HandleAppDeactivated() { |
637 // Another application was activated, we should reset any state that | 637 if (IsInactiveRenderingDisabled()) { |
638 // disables inactive rendering now. | 638 delegate_->EnableInactiveRendering(); |
639 delegate_->EnableInactiveRendering(); | 639 } else { |
| 640 // TODO(pkotwicz): Remove need for SchedulePaint(). crbug.com/165841 |
| 641 View* non_client_view = GetWidget()->non_client_view(); |
| 642 if (non_client_view) |
| 643 non_client_view->SchedulePaint(); |
| 644 } |
640 } | 645 } |
641 | 646 |
642 void NativeWidgetWin::HandleActivationChanged(bool active) { | 647 void NativeWidgetWin::HandleActivationChanged(bool active) { |
643 delegate_->OnNativeWidgetActivationChanged(active); | 648 delegate_->OnNativeWidgetActivationChanged(active); |
644 } | 649 } |
645 | 650 |
646 bool NativeWidgetWin::HandleAppCommand(short command) { | 651 bool NativeWidgetWin::HandleAppCommand(short command) { |
647 // We treat APPCOMMAND ids as an extension of our command namespace, and just | 652 // We treat APPCOMMAND ids as an extension of our command namespace, and just |
648 // let the delegate figure out what to do... | 653 // let the delegate figure out what to do... |
649 return GetWidget()->widget_delegate() && | 654 return GetWidget()->widget_delegate() && |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 // static | 1028 // static |
1024 bool NativeWidgetPrivate::IsTouchDown() { | 1029 bool NativeWidgetPrivate::IsTouchDown() { |
1025 // This currently isn't necessary because we're not generating touch events on | 1030 // This currently isn't necessary because we're not generating touch events on |
1026 // windows. When we do, this will need to be updated. | 1031 // windows. When we do, this will need to be updated. |
1027 return false; | 1032 return false; |
1028 } | 1033 } |
1029 | 1034 |
1030 } // namespace internal | 1035 } // namespace internal |
1031 | 1036 |
1032 } // namespace views | 1037 } // namespace views |
OLD | NEW |