NSRect frame = parent ? [parent bounds] : [[NSScreen mainScreen] frame];
int y = r.y;
int x = r.x ;
- if ( parent != NULL && ![ parent isFlipped ] )
+ if ( parent == NULL || ![ parent isFlipped ] )
y = frame.size.height - ( r.y + r.height );
return NSMakeRect(x, y, r.width , r.height);
}
NSRect frame = parent ? [parent bounds] : [[NSScreen mainScreen] frame];
int y = rect.origin.y;
int x = rect.origin.x;
- if ( parent != NULL && ![ parent isFlipped ] )
+ if ( parent == NULL || ![ parent isFlipped ] )
y = frame.size.height - (rect.origin.y + rect.size.height);
return wxRect( x, y, rect.size.width, rect.size.height );
}
NSRect frame = parent ? [parent bounds] : [[NSScreen mainScreen] frame];
int x = p.x ;
int y = p.y;
- if ( parent != NULL && ![ parent isFlipped ] )
+ if ( parent == NULL || ![ parent isFlipped ] )
y = frame.size.height - ( p.y );
return NSMakePoint(x, y);
}
NSRect frame = parent ? [parent bounds] : [[NSScreen mainScreen] frame];
int x = p.x;
int y = p.y;
- if ( parent != NULL && ![ parent isFlipped ] )
+ if ( parent == NULL || ![ parent isFlipped ] )
y = frame.size.height - ( p.y );
return wxPoint( x, y);
}