| 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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 ::SetFocus(native_view); | 1167 ::SetFocus(native_view); |
| 1168 } | 1168 } |
| 1169 | 1169 |
| 1170 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { | 1170 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { |
| 1171 return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area(); | 1171 return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area(); |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { | 1174 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop() { | 1177 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop( |
| 1178 const gfx::Point& drag_offset) { |
| 1178 ReleaseCapture(); | 1179 ReleaseCapture(); |
| 1179 MoveLoopMouseWatcher watcher(this); | 1180 MoveLoopMouseWatcher watcher(this); |
| 1180 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos()); | 1181 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos()); |
| 1181 // Windows doesn't appear to offer a way to determine whether the user | 1182 // Windows doesn't appear to offer a way to determine whether the user |
| 1182 // canceled the move or not. We assume if the user released the mouse it was | 1183 // canceled the move or not. We assume if the user released the mouse it was |
| 1183 // successful. | 1184 // successful. |
| 1184 return watcher.got_mouse_up() ? Widget::MOVE_LOOP_SUCCESSFUL : | 1185 return watcher.got_mouse_up() ? Widget::MOVE_LOOP_SUCCESSFUL : |
| 1185 Widget::MOVE_LOOP_CANCELED; | 1186 Widget::MOVE_LOOP_CANCELED; |
| 1186 } | 1187 } |
| 1187 | 1188 |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2770 // static | 2771 // static |
| 2771 bool NativeWidgetPrivate::IsTouchDown() { | 2772 bool NativeWidgetPrivate::IsTouchDown() { |
| 2772 // This currently isn't necessary because we're not generating touch events on | 2773 // This currently isn't necessary because we're not generating touch events on |
| 2773 // windows. When we do, this will need to be updated. | 2774 // windows. When we do, this will need to be updated. |
| 2774 return false; | 2775 return false; |
| 2775 } | 2776 } |
| 2776 | 2777 |
| 2777 } // namespace internal | 2778 } // namespace internal |
| 2778 | 2779 |
| 2779 } // namespace views | 2780 } // namespace views |
| OLD | NEW |