+ if( o_rect.size.height < [o_window contentMinSize].height )
+ o_rect.size.height = [o_window contentMinSize].height;
+ if( o_rect.size.width < [o_window contentMinSize].width )
+ o_rect.size.width = [o_window contentMinSize].width;
+ }
+ else
+ {
+ NSRect contentRect = [o_window contentRectForFrameRect:[o_window frame]];
+ /* make small */
+ o_rect.size.height = [o_window contentMinSize].height;
+ o_rect.size.width = [o_window contentMinSize].width;
+ o_rect.origin.x = contentRect.origin.x;
+ /* Calculate the position of the lower right corner after resize */
+ o_rect.origin.y = contentRect.origin.y +
+ contentRect.size.height - [o_window contentMinSize].height;
+ }