Re: NSScreen.screens under multiple displays

2023-06-08 Thread Jeff Szuhay via Cocoa-dev
>resending from correct email address<


You may have to go to the Quartz level to get the active display list with

CGError 
 
CGGetOnlineDisplayList( uint32_t  maxDisplays, 
CGDirectDisplayID 

 *onlineDisplays, 
uint32_t *displayCount);

see 
>

I have been meaning to do this when I get around to updating my app but I have 
not not played with this yet.
Sample code? Sample code? Anyone?


> On Jun 8, 2023, at 12:06 PM, Alex Zavatone via Cocoa-dev 
> mailto:cocoa-dev@lists.apple.com>> wrote:
> 
> I have a 2 screen system running Ventura and another 3 screen system but not 
> under Ventura.  
> 
> I could build and test for you if you wish.
> 
>> On Jun 8, 2023, at 11:53 AM, Gabriel Zachmann via Cocoa-dev 
>> mailto:cocoa-dev@lists.apple.com>> wrote:
>> 
>> In my method 
>> 
>>  - (void) viewDidMoveToWindow
>> 
>> I have these lines of code:
>> 
>>   window_ = [self window];
>>   NSUInteger idx_of_screen = [NSScreen.screens indexOfObject: 
>> window_.screen];
>> 
>> My question is: will this always produce the same results, whether or not 
>> the user has switched "Displays have separate Spaces" on or off (under 
>> Desktop & Dock).
>> 
>> 
>> Best regards, Gabriel
>> 
>> ___
>> 
>> 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 cocoa-dev-admins(at)lists.apple.com 
>> 
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com 
>> 
>> 
>> This email sent to z...@mac.com
> 
> ___
> 
> 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 cocoa-dev-admins(at)lists.apple.com 
> 
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/jeff%40szuhay.org 
> 
> 
> This email sent to j...@szuhay.org

___

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 cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSScreen.screens under multiple displays

2023-06-08 Thread Rob Petrovec via Cocoa-dev
The order of the screens can change under various user scenarios.  One easy one 
is simply re-arranging the displays, or even moving the menu bar thing from one 
display to another in the Arrange UI Displays prefs pane. Obviously plugging & 
unplugging displays or closing a laptop with an external display will change it 
too. You should not assume the index of the screen your window is on, if that 
is what you were thinking.  Hope that helps.

—Rob


> On Jun 8, 2023, at 10:53 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> In my method 
> 
>   - (void) viewDidMoveToWindow
> 
> I have these lines of code:
> 
>window_ = [self window];
>NSUInteger idx_of_screen = [NSScreen.screens indexOfObject: 
> window_.screen];
> 
> My question is: will this always produce the same results, whether or not the 
> user has switched "Displays have separate Spaces" on or off (under Desktop & 
> Dock).
> 
> 
> Best regards, Gabriel
> 
> ___
> 
> 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 cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
> 
> This email sent to petr...@mac.com

___

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 cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSScreen.screens under multiple displays

2023-06-08 Thread Alex Zavatone via Cocoa-dev
I have a 2 screen system running Ventura and another 3 screen system but not 
under Ventura.  

I could build and test for you if you wish.

> On Jun 8, 2023, at 11:53 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> In my method 
> 
>   - (void) viewDidMoveToWindow
> 
> I have these lines of code:
> 
>window_ = [self window];
>NSUInteger idx_of_screen = [NSScreen.screens indexOfObject: 
> window_.screen];
> 
> My question is: will this always produce the same results, whether or not the 
> user has switched "Displays have separate Spaces" on or off (under Desktop & 
> Dock).
> 
> 
> Best regards, Gabriel
> 
> ___
> 
> 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 cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

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 cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSScreen.screens under multiple displays

2023-06-08 Thread Gabriel Zachmann via Cocoa-dev
In my method

   - (void) viewDidMoveToWindow

I have these lines of code:

window_ = [self window];
NSUInteger idx_of_screen = [NSScreen.screens indexOfObject: window_.screen];

My question is: will this always produce the same results, whether or not the 
user has switched "Displays have separate Spaces" on or off (under Desktop & 
Dock).


Best regards, Gabriel



smime.p7s
Description: S/MIME cryptographic signature
___

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 cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Screensaver running only on one display with a multiple display setup

2023-06-08 Thread Gabriel Zachmann via Cocoa-dev
I have a screensaver that is supposed to run on all displays simultaneously.
MacOS launches several instances, if there are multiple displays.

I have one user, who has three displays connected to the Mac, but only the main 
display (center) gets a screensaver.
This is on macOS Ventura 13.4.
(I should also say that with other users, who also have multiple displays, 
everything seems fine.)

According to the log file, legacyScreenSaver does launch three instances of my 
screen saver, but then only one continues to run.
There are no error message or other hints - as far as I can see - as to why the 
other two instance do not continue to run; I believe they are killed.

Does anyone have an idea? Or an idea how I could track down the problem?

I know all three instances are launched because I can see their individual info 
messages in the log file.
But then, only one of them continues to output info message in the log file.

Thanks a lot in advance.

Best regards, Gabriel



smime.p7s
Description: S/MIME cryptographic signature
___

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 cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com