AX shrink a window from full zoom by 20 pixel height fails

Originator:peter
Number:rdar://22398195 Date Originated:24-Aug-2015 04:24 PM
Status:Open Resolved:
Product:OS X Product Version:
Classification: Reproducible:
 
Summary:
Probably having the Dock hidden is a requirement.

If you zoom a window to full size (eg a Finder window), and then run this script (attached), it demonstrates the issue.

// Drag the front Finder window so it is touching the menu bar
h = 1440; // <-- adjust to your screen height

se = Application('System Events');
// This works:
se.applicationProcesses.byName("Finder").windows[0].size = [1500, h-200];
se.applicationProcesses.byName("Finder").windows[0].size = [1500, h-47];
// This fails
se.applicationProcesses.byName("Finder").windows[0].size = [1500, h-200];
se.applicationProcesses.byName("Finder").windows[0].size = [1500, h-27];
se.applicationProcesses.byName("Finder").windows[0].size = [1500, h-47]; // <-- fails

Basically, if the window is "almost" zoomed (20 pixels up from the bottom), you cannot reduce its size by a small amount (20 pixels).  You can reduce it by a large amount, and then increase it back to the original destination.  So this is clearly a bug in the behaviour.

Steps to Reproduce:
Create a new Finder window, option-zoom it or drag it to the touch the menu bar.

Adjust the h variable in the script to match your screen height.

Run the script.

Please do NOT ask for a system profile unless you have actually performed this sequence and failed to duplicate it.

Expected Results:


Actual Results:


Version:
10.10.5

Notes:


Configuration:


Attachments:
'Window Adjustment Bug.scpt' was successfully uploaded.

Comments


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!