On Fri, 30 Jun 2017 19:29:54 -0500, Ken Thomases said: >> Does anyone know what NSWindow's initWithContentRect: behaviour is >with non-integer contentRect? The docs don't say. It seems that, on a >retina display, window size can only be an even number of pixels (ie an >integer number of points). > >I have experience with this and have seen the same behavior as you. A >window's size and position are restricted to integral points. If you >pass a non-integral rect, it will be expanded outward to be integral.
Thanks for the confirmation! That's mostly what I was looking for posting this... Now off to radar to suggest better docs. >I suspect that this is for the situation where a system has a >combination of Retina and non-Retina displays. You don't want dragging >a window from one to the other to change its size. Ah, that's a good point, and plausible theory. >If your window is borderless, you can make it transparent and have a >fractional-size view (subview of the contentView) do the base opaque >drawing, thereby effectively setting the size of the window. Thanks for the suggestion, though in this case I need a regular window with title bar and all. Cheers, Sean _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com