OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ui/views/cocoa/bridged_native_widget.h" | 5 #import "ui/views/cocoa/bridged_native_widget.h" |
6 | 6 |
7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #import "base/mac/foundation_util.h" | 12 #import "base/mac/foundation_util.h" |
11 #include "base/mac/mac_util.h" | 13 #include "base/mac/mac_util.h" |
12 #import "base/mac/sdk_forward_declarations.h" | 14 #import "base/mac/sdk_forward_declarations.h" |
13 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
14 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" | 16 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
15 #import "ui/base/cocoa/constrained_window/constrained_window_animation.h" | 17 #import "ui/base/cocoa/constrained_window/constrained_window_animation.h" |
16 #include "ui/base/hit_test.h" | 18 #include "ui/base/hit_test.h" |
17 #include "ui/base/ime/input_method.h" | 19 #include "ui/base/ime/input_method.h" |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 [bridged_view_ setMouseDownCanMoveWindow:draggable]; | 1211 [bridged_view_ setMouseDownCanMoveWindow:draggable]; |
1210 // AppKit will not update its cache of mouseDownCanMoveWindow unless something | 1212 // AppKit will not update its cache of mouseDownCanMoveWindow unless something |
1211 // changes. Previously we tried adding an NSView and removing it, but for some | 1213 // changes. Previously we tried adding an NSView and removing it, but for some |
1212 // reason it required reposting the mouse-down event, and didn't always work. | 1214 // reason it required reposting the mouse-down event, and didn't always work. |
1213 // Calling the below seems to be an effective solution. | 1215 // Calling the below seems to be an effective solution. |
1214 [window_ setMovableByWindowBackground:NO]; | 1216 [window_ setMovableByWindowBackground:NO]; |
1215 [window_ setMovableByWindowBackground:YES]; | 1217 [window_ setMovableByWindowBackground:YES]; |
1216 } | 1218 } |
1217 | 1219 |
1218 } // namespace views | 1220 } // namespace views |
OLD | NEW |