diff --git a/src/backend/cocoa.m b/src/backend/cocoa.m index ac694c8..8e3ba2b 100644 --- a/src/backend/cocoa.m +++ b/src/backend/cocoa.m @@ -793,7 +793,12 @@ static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, } else { frame = [self->window frame]; } - frame = rectFlip(frame); + + if(!self->parent) { + frame = rectFlip(frame); + } else { + frame = localRectFlip(frame, self->parent->cocoa.real->view); + } *x = frame.origin.x; *y = frame.origin.y;