Remove the deprecated convertScreenToBase and convertBaseToScreen.

This commit is contained in:
patr0nus 2014-10-25 11:06:39 +08:00
parent 623e3ebc03
commit 915a6196cc
2 changed files with 6 additions and 4 deletions

View file

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

View file

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