Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Window size setting



Hi,

I have connected two monitors to a machine and arranged them in a
vertical combination (Secondary monitor is placed on top of the
Primary monitor) .

Monitor Frames are:  Monitor 1(primary) --------- Origin:(0,0) size(1024, 768)
		       	       Monitor 2 (Secondary) --- Origin:(0,-768) size(1024, 768)

I am trying to set the size and position of the active window using
following Accessibility api code:

		NSLog(@"Origin:(%.f,%.f) size(%.f, %.f)", globalFrame.origin.x,
globalFrame.origin.y, globalFrame.size.width,
globalFrame.size.height);    ----> Output is:  Origin:(0,-768)
size(1024, 1536)
		
		CGPoint newWindowPos = CGPointMake(globalFrame.origin.x,
globalFrame.origin.y);
		CFTypeRef newWindowPos1 = AXValueCreate(kAXValueCGPointType, (void
*)&newWindowPos);
		
		CGSize newSizeRef = CGSizeMake(globalFrame.size.width,
globalFrame.size.height);
		CFTypeRef newSizeRef1 = AXValueCreate(kAXValueCGSizeType, (void
*)&newSizeRef);
		CFShow(newSizeRef1);
		
		AXUIElementSetAttributeValue(m_curWndElement, kAXPositionAttribute,
newWindowPos1);
		AXUIElementSetAttributeValue(m_curWndElement, kAXSizeAttribute, newSizeRef1);

Window position is setting fine, but size(only height) is not setting
properly. After above code execution, My window new rect is:
		Origin:(0,-768) size(1024, 768)

Window height is not setting properly. For Horizontal monitor
arrangement,  it is working as expected. Is accessibility API is
having issues in Window height set?.

- Apparao.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/accessibility-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.