| Index: ui/views/test/event_generator_delegate_mac.mm
|
| diff --git a/ui/views/test/event_generator_delegate_mac.mm b/ui/views/test/event_generator_delegate_mac.mm
|
| index a1ab5cb466b875c339e567b8e9b1ace56adc840d..55005ea2c4647103ab53c465a2105e3f0cd20934 100644
|
| --- a/ui/views/test/event_generator_delegate_mac.mm
|
| +++ b/ui/views/test/event_generator_delegate_mac.mm
|
| @@ -428,7 +428,9 @@ gfx::Point EventGeneratorDelegateMac::CenterOfTarget(
|
| gfx::Point EventGeneratorDelegateMac::CenterOfWindow(
|
| gfx::NativeWindow window) const {
|
| DCHECK_EQ(window, window_);
|
| - return gfx::ScreenRectFromNSRect([window frame]).CenterPoint();
|
| + // Assume the window is at the top-left of the coordinate system (even if
|
| + // AppKit has moved it into the work area) see ConvertRootPointToTarget().
|
| + return gfx::Point(NSWidth([window frame]) / 2, NSHeight([window frame]) / 2);
|
| }
|
|
|
| // Return the current owner of the EventGeneratorDelegate. May be null.
|
|
|