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

Side by Side Diff: ui/gfx/screen_mac.mm

Issue 7981012: Add Mouse hover behavior to Mac Panels when minimized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr feedback Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/gfx/screen.h"
6
7 #import <Cocoa/Cocoa.h>
8
9 namespace gfx {
10
11 // static
12 gfx::Point Screen::GetCursorScreenPoint() {
13 NSPoint mouseLocation = [NSEvent mouseLocation];
14 // Flip coordinates to gfx (0,0 in top-left corner) using primary screen.
15 NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
16 mouseLocation.y = NSMaxY([screen frame]) - mouseLocation.y;
17 return gfx::Point(mouseLocation.x, mouseLocation.y);
18 }
19
20 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698