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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 ::SetFocus(GetNativeView()); | 1180 ::SetFocus(GetNativeView()); |
1181 } | 1181 } |
1182 | 1182 |
1183 void NativeWidgetWin::FocusNativeView(gfx::NativeView native_view) { | 1183 void NativeWidgetWin::FocusNativeView(gfx::NativeView native_view) { |
1184 // Only reset focus if hwnd is not already focused. | 1184 // Only reset focus if hwnd is not already focused. |
1185 if (native_view && ::GetFocus() != native_view) | 1185 if (native_view && ::GetFocus() != native_view) |
1186 ::SetFocus(native_view); | 1186 ::SetFocus(native_view); |
1187 } | 1187 } |
1188 | 1188 |
1189 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { | 1189 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { |
1190 return gfx::Screen::GetMonitorNearestWindow(GetNativeView()).work_area(); | 1190 return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area(); |
1191 } | 1191 } |
1192 | 1192 |
1193 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { | 1193 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { |
1194 } | 1194 } |
1195 | 1195 |
1196 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop() { | 1196 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop() { |
1197 ReleaseCapture(); | 1197 ReleaseCapture(); |
1198 MoveLoopMouseWatcher watcher(this); | 1198 MoveLoopMouseWatcher watcher(this); |
1199 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos()); | 1199 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos()); |
1200 // Windows doesn't appear to offer a way to determine whether the user | 1200 // Windows doesn't appear to offer a way to determine whether the user |
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2784 // static | 2784 // static |
2785 bool NativeWidgetPrivate::IsTouchDown() { | 2785 bool NativeWidgetPrivate::IsTouchDown() { |
2786 // This currently isn't necessary because we're not generating touch events on | 2786 // This currently isn't necessary because we're not generating touch events on |
2787 // windows. When we do, this will need to be updated. | 2787 // windows. When we do, this will need to be updated. |
2788 return false; | 2788 return false; |
2789 } | 2789 } |
2790 | 2790 |
2791 } // namespace internal | 2791 } // namespace internal |
2792 | 2792 |
2793 } // namespace views | 2793 } // namespace views |
OLD | NEW |