mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Remove the deprecated convertScreenToBase and convertBaseToScreen.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user