PTB won't display window in 2nd monitor when 'rect' supplied to Screen command

Hello, I'm running PTB on a macbook Pro (2012) laptop running OSX 10.12.6 with Matlab 2019a.  

My external monitor is the Apple Retina Display.  My issue is that I'm unable to display a window on the external monitor when 'rect' is supplied to the Screen command.  


Screen('Screens') command Returns [0 1] as expected.  Likewise depending on how I specify the screen to use for the experiment (i.e. expScreen = either 0 or 1), the Screen('Rect', expScreen ) gives me the appropriate dimensions of the screen depending on which one I specify.


The issue is when I try to open a widow.  

Screen('OpenWindow', expScreen) opens the window on the appropriate monitor as expected.  However, when the rect argument is supplied to the command, it no longer seems to work:  


For example, to open a smaller widow (1/2 screen size), I use rect = .5*rect;  However, Screen('OpenWindow', expScreen, [], rect) will ONLY open the widow on my laptop regardless of which monitor is specified in expScreen.  


Any suggestions? 

Read up on how rects work (not sure of the exact ref). The rect provided is not relative to the indicated screen, but in some global space of pixels spanned by both screens. So if laptop screen is 1920x1080 and external screen is configured to be to the right of it, supply a rect that starts beyond 1920 horizontally

On Thu, Sep 12, 2019 at 10:11 PM damon.abraham@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:


Hello, I'm running PTB on a macbook Pro (2012) laptop running OSX 10.12.6 with Matlab 2019a.

My external monitor is the Apple Retina Display. My issue is that I'm unable to display a window on the external monitor when 'rect' is supplied to the Screen command.


Screen('Screens') command Returns [0 1] as expected. Likewise depending on how I specify the screen to use for the experiment (i.e. expScreen = either 0 or 1), the Screen('Rect', expScreen ) gives me the appropriate dimensions of the screen depending on which one I specify.


The issue is when I try to open a widow.

Screen('OpenWindow', expScreen) opens the window on the appropriate monitor as expected. However, when the rect argument is supplied to the command, it no longer seems to work:


For example, to open a smaller widow (1/2 screen size), I use rect = .5*rect; However, Screen('OpenWindow', expScreen, [], rect) will ONLY open the widow on my laptop regardless of which monitor is specified in expScreen.


Any suggestions?