mac: Don't use [NSScreen mainScreen]

This commit is contained in:
Cheng Zhao 2015-05-10 16:51:18 +08:00
parent 312b8c95ba
commit ce042d0524
2 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@
NSRect frame = [NSApp currentEvent].window.frame;
gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame));
// Flip coordinates to gfx (0,0 in top-left corner) using current screen.
NSScreen* screen = [NSScreen mainScreen];
NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame));
trayIcon_->NotifyClicked(bounds);