Re: CGConfigureDisplayOrigin
Re: CGConfigureDisplayOrigin
- Subject: Re: CGConfigureDisplayOrigin
- From: Mike Paquette <email@hidden>
- Date: Wed, 13 Apr 2005 09:06:35 -0700
The actual position a display is placed at will be as close as
possible to the requested location without overlapping or leaving a
gap between displays. One display must always have an origin of (0,0).
The configuration code will take the requested layout information,
and if it does not meet the requirements for tiling and maintaining
one display at (0,0), will adjust the requested layout as needed to
meet these requirements.
On Apr 12, 2005, at 10:20 PM, Niyaz wrote:
Hi All,
I tried using CGConfigureDisplayOrigin API to shift the global desktop
origin. Wrote the code as below:
/******************************** CODE BEGINS HERE
*****************************************/
CGError err;
GDisplayConfigRef configRef;
CGDirectDisplayID display;
CGDisplayCoord x, y;
boolean_t b;
size_t h,w;
CGRect cgrect;
CGDisplayErr disperr;
err = CGBeginDisplayConfiguration(&configRef);
display = CGMainDisplayID();
b = CGDisplayIsActive(kCGDirectMainDisplay);
b = CGDisplayIsMain(kCGDirectMainDisplay);
cgrect = CGDisplayBounds(kCGDirectMainDisplay);
err = CGConfigureDisplayOrigin(configRef,kCGDirectMainDisplay,
555,555);
if(err){
err = CGCancelDisplayConfiguration(configRef);
}
else{
err = CGCompleteDisplayConfiguration(configRef,1);
}
/******************************** CODE ENDS HERE
*****************************************/
But, to my surprise the change didn't happened. Is there anything I
missed out to make it happen?
Thanking you in anticipation.
Regards
Niyaz N
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden