Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Unified Diff: ui/views/event_monitor_mac.mm

Issue 1380083005: Mac: Use [NSArray firstObject] for [NSScreen screens] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/snapshot/snapshot_mac.mm ('k') | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/event_monitor_mac.mm
diff --git a/ui/views/event_monitor_mac.mm b/ui/views/event_monitor_mac.mm
index cb3e54e9a1c7e2550b6c0e1b71d160f2be28200e..45578c9948a43fbedafc6e81c1be4cdadfa7190d 100644
--- a/ui/views/event_monitor_mac.mm
+++ b/ui/views/event_monitor_mac.mm
@@ -30,7 +30,7 @@ scoped_ptr<EventMonitor> EventMonitor::CreateWindowMonitor(
gfx::Point EventMonitor::GetLastMouseLocation() {
NSPoint mouseLocation = [NSEvent mouseLocation];
// Flip coordinates to gfx (0,0 in top-left corner) using primary screen.
- NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
+ NSScreen* screen = [[NSScreen screens] firstObject];
mouseLocation.y = NSMaxY([screen frame]) - mouseLocation.y;
return gfx::Point(mouseLocation.x, mouseLocation.y);
}
« no previous file with comments | « ui/snapshot/snapshot_mac.mm ('k') | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698