Window size setting
Window size setting
- Subject: Window size setting
- From: "Apparao Mulpuri" <email@hidden>
- Date: Mon, 16 Jun 2008 15:32:17 +0530
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:
This email sent to email@hidden