BUG: NSWindow -setFrame:display: can't use non-integral values

Originator:craig.hockenberry
Number:rdar://11978869 Date Originated:
Status:Open Resolved:
Product:Mac OS X Product Version:12A269
Classification:Serious Bug Reproducible:Always
 
Summary:

A window's frame can only be set with full points. Setting a half-point value for the window's origin causes the next lowest integral value to be used. Setting a half-point value for the size causes the next highest integral value to be used.

Steps to Reproduce:

1) Create an NSWindow.
2) Call -setFrame:display: using an NSRect with non-integral values.

(See the attached sample application)

Expected Results:

The window's position should be set to non-integral values.

In the sample application running on a Retina display, the window's x origin should move one pixel and it's width should grow by one pixel.

Actual Results:

The window's position is set to integral values.

The sample application's window origin does not change and it's size grows by two pixels.

Regression:

Prior to a Retina display, there was no need to align windows with non-integral values.

Notes:

Setting the position to non-integral values is very useful if an application is using a secondary NSWindow as a callout/overlay for another NSWindow that contains high resolution imagery. The secondary window can't be aligned perfectly.

Comments

Download

The sample project can be downloaded from: http://files.iconfactory.net/craig/bugs/Retanal.zip

By craig.hockenberry at July 28, 2012, 12:32 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!