Index: ui/gfx/screen_mac.mm |
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm |
index 51c0b665b7e34274b98cf4c2d3386898af8c98f3..8ebb0dc02983bf02bbad98b99770335d50b87ac5 100644 |
--- a/ui/gfx/screen_mac.mm |
+++ b/ui/gfx/screen_mac.mm |
@@ -46,8 +46,11 @@ NSScreen* GetMatchingScreen(const gfx::Rect& match_rect) { |
gfx::Display GetDisplayForScreen(NSScreen* screen) { |
NSRect frame = [screen frame]; |
- // TODO(oshima): Implement ID and Observer. |
- gfx::Display display(0, gfx::Rect(NSRectToCGRect(frame))); |
+ // TODO(oshima): Implement Observer. |
+ |
+ int64 displayId = [[[screen deviceDescription] |
+ objectForKey:@"NSScreenNumber"] intValue]; |
+ gfx::Display display(displayId, gfx::Rect(NSRectToCGRect(frame))); |
NSRect visible_frame = [screen visibleFrame]; |
NSScreen* primary = [[NSScreen screens] objectAtIndex:0]; |