Re: Move window to second display
Re: Move window to second display
- Subject: Re: Move window to second display
- From: Fabian <email@hidden>
- Date: Wed, 16 Jul 2008 18:42:03 +0200
Hum, OK. Thanks to both of you. So what's wrong with the code then?
On Wed, Jul 16, 2008 at 6:36 PM, Jean-Daniel Dupas
<email@hidden> wrote:
>
> Le 16 juil. 08 à 18:15, Scott Ribe a écrit :
>
>>> The window frame origin is a position relative to the screen origin.
>>>
>>> Try this:
>>>
>>> screenRect.origin = NSZeroPoint;
>>> [win setFrame:screenRect display:YES];
>>
>> No, that will just position the window on the main screen. If the window
>> frame origin were relative to the screen origin rather than the whole
>> space,
>> then there would be no way using setFrame to move a window to a different
>> screen.
>>
>
> You're right.
>
> I mix with the -[NSWindow initWithContentRect:...screen:] method that
> expects a relative to screen frame.
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden