> On Nov 17, 2022, at 16:11, Gabriel Zachmann via Cocoa-dev
> wrote:
>
> Thanks a lot for your quick responses!
>
> I would like to understand what you are saying and what is going on, so
> please bear with me.
>
> So, Steve, if I understand correctly, you suggest to write:
>
> - (void)
Thanks a lot for your quick responses!
I would like to understand what you are saying and what is going on, so please
bear with me.
So, Steve, if I understand correctly, you suggest to write:
- (void) viewWillMoveToWindow: (NSWindow *) newWindow
{
unsigned long my_screen =
Testing, please disregard.
Dave
--
David Young
dyo...@pobox.comUrbana, IL(217) 721-9981
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at
> On Nov 17, 2022, at 11:59, Jack Brindle via Cocoa-dev
> wrote:
>
> The NSScreen screen property is nullable. From the docs for NSWindow screen:
>
> "The value of this property is the screen where most of the window is on; it
> is nil when the window is offscreen."
If a screensaver window
The NSScreen screen property is nullable. From the docs for NSWindow screen:
"The value of this property is the screen where most of the window is on; it is
nil when the window is offscreen."
I would go with Steve’s suggestion as much as possible, The NSScreen class has
the info you need.
> On Nov 17, 2022, at 10:44, Gabriel Zachmann via Cocoa-dev
> wrote:
>
> In my screensaver (macOS),
> I am trying to retrieve the 'screen number' (NSScreenNumber) for the screen
> on which I am running.
[NSScreen.screens indexOfObject:window.screen] gives you the zero-based screen
index. 0
In my screensaver (macOS),
I am trying to retrieve the 'screen number' (NSScreenNumber) for the screen on
which I am running.
So, in
- (void) viewWillMoveToWindow: (NSWindow *) newWindow
I have this line of code:
displayID_ = [ [[newWindow screen] deviceDescription] objectForKey: