# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6)
NSRect rr1 = [w->window.view convertRect: NSMakeRect(0,0,0,0) toView:nil];
NSRect rr2 = [nsw convertRectToScreen: rr1];
+
NSPoint wpos = NSMakePoint (rr2.origin.x - rr1.origin.x,
rr2.origin.y - rr1.origin.y);
# else
vpos.y += wpos.y;
// get top left of view on screen, from bottom left
- vpos.y += w->frame.height;
+ double s = [w->window.view hackedContentScaleFactor];
+ vpos.y += w->frame.height / s;
// get top left of view on screen, from top left
NSArray *screens = [NSScreen screens];