Merge pull request #742 from patr0nus/yosemite-fix

Yosemite build fix
This commit is contained in:
Cheng Zhao 2014-10-26 19:36:08 +08:00
commit 9e32570dfa
4 changed files with 8 additions and 6 deletions

View file

@ -21,7 +21,7 @@ void AtomBrowserMainParts::PreMainMessageLoopStart() {
NSApplication* application = [AtomApplication sharedApplication];
AtomApplicationDelegate* delegate = [AtomApplicationDelegate alloc];
[NSApp setDelegate:delegate];
[NSApp setDelegate:(id<NSFileManagerDelegate>)delegate];
base::FilePath frameworkPath = brightray::MainApplicationBundlePath()
.Append("Contents")

View file

@ -29,7 +29,7 @@ std::string Browser::GetExecutableFileProductName() const {
}
int Browser::DockBounce(BounceType type) {
return [[AtomApplication sharedApplication] requestUserAttention:type];
return [[AtomApplication sharedApplication] requestUserAttention:(NSRequestUserAttentionType)type];
}
void Browser::DockCancelBounce(int rid) {

View file

@ -604,8 +604,10 @@ bool NativeWindowMac::IsWithinDraggableRegion(NSPoint point) const {
}
void NativeWindowMac::HandleMouseEvent(NSEvent* event) {
NSPoint current_mouse_location =
[window_ convertBaseToScreen:[event locationInWindow]];
NSPoint eventLoc = [event locationInWindow];
NSRect mouseRect = [window_ convertRectToScreen:NSMakeRect(eventLoc.x, eventLoc.y, 0, 0)];
NSPoint current_mouse_location = mouseRect.origin;
if ([event type] == NSLeftMouseDown) {
NSPoint frame_origin = [window_ frame].origin;

View file

@ -58,8 +58,8 @@
// Convert the event's location from the original window's coordinates into
// our own.
NSPoint eventLoc = [event locationInWindow];
eventLoc = [[event window] convertBaseToScreen:eventLoc];
eventLoc = [self convertScreenToBase:eventLoc];
eventLoc = [self convertRectFromScreen:
[[event window] convertRectToScreen:NSMakeRect(eventLoc.x, eventLoc.y, 0, 0)]].origin;
// Various things *only* apply to key down/up.
BOOL eventIsARepeat = NO;