# Re: window placement?

**URL:** <https://psychtoolbox.discourse.group/t/re-window-placement/195>\
**Category:** Uncategorized\
**Created:** [October 29, 2019, 1:39am UTC](https://psychtoolbox.discourse.group/t/re-window-placement/195 "2019-10-29T01:39:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denispelli](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@denispelli](https://psychtoolbox.discourse.group/u/denispelli)\
**Post date:** [October 29, 2019, 1:39am UTC](https://psychtoolbox.discourse.group/t/re-window-placement/195/1 "2019-10-29T01:39:13Z")

</div>

i just ran exactly the same code on my 2015 MacBook Pro and got the correct behavior (window in lower right).

So the problem is specific to the iMac.
  
  

| 

 |  

 | | |   
**Denis Pelli**  
 Professor of Psychology & Neural Science, New York University 
 

 |   

+1-646-258-7524| [denis.pelli@...](mailto:denis.pelli@...)

  |
 |  

[http://psych.nyu.edu/pelli/](http://psych.nyu.edu/pelli/)| Skype: denispelli

  |
 | | [http://denispelli.com](http://denispelli.com) |
 
 

| | | |

  |
 
  |
 
 

| |

 |

  

> On Mon, Oct 28, 2019 at 8:35 PM Denis Pelli \<[denis.pelli@...](mailto:denis.pelli@...)\> wrote:  
> 
> > dear mario
> > 
> > my program tries to open a small window in the lower right hand corner.
> > 
> > this used to work fine, but today it doesn't. The window appears instead in the upper left corner. 
> > 
> > I think my code is unchanged, so i don't understand the changed behavior.
> > 
> >   
> > 
> > fractionOfScreenUsed=0.3; % Set less than 1 only for debugging.
> > 
> > screenBufferRect=Screen('Rect',screen);
> > 
> > r=round(fractionOfScreenUsed\*screenBufferRect);
> > 
> > r=AlignRect(r,screenBufferRect,'right','bottom');
> > 
> > window=Screen('OpenWindow',screen,white,r);
> > 
> > r =  
> >   
> > 1792 1008 2560 1440
> > 
> > Screen('Rect',0)  
> >   
> > ans =  
> >   
> > 0 0 2560 1440
> > 
> > Everything's ok, except the window is in upper left, but should be in lower right corner.
> > 
> > Any idea what might be wrong?
> > 
> > Denis
> > 
> > model: 'iMac15,1'  
> > modelDescription: 'iMac (Retina 5K, 27-inch, Late 2014)'  
> > manufacturer: 'Apple Inc.'  
> > psychtoolbox: 'Psychtoolbox 3.0.16'  
> > matlab: 'MATLAB 9.6 (R2019a)'  
> > system: 'macOS 10.14.6'  
> > screenMex: 'Screen.mexmaci64 07-Aug-2019'  
> > screens: 0  
> > screen: 0  
> > size: [2880 5120]  
> > nativeSize: [2880 5120]  
> > mm: [340 599]  
> > openGLRenderer: 'AMD Radeon R9 M290X OpenGL Engine'  
> > openGLVendor: 'ATI Technologies Inc.'  
> > openGLVersion: '2.1 ATI-2.11.20'  
> > psychtoolboxKernelDriver: 'PsychtoolboxKernelDriver 1.1'  
> > drawTextPlugin: 1  
> > psychPortAudio: 1  
> > summary: 'iMac15,1-macOS-10.14.6-PTB-3.0.16'
> > 
> > | 
> > 
> > |  
> > 
> > | | |   
> > **Denis Pelli**  
> > Professor of Psychology & Neural Science, New York University 
> >  
> > 
> > |   
> > 
> > +1-646-258-7524| [denis.pelli@...](mailto:denis.pelli@...)
> > 
> > |
> > |  
> > 
> > [http://psych.nyu.edu/pelli/](http://psych.nyu.edu/pelli/)| Skype: [denispelli](#m_-4747515600518700736_)
> > 
> > |
> > | | [http://denispelli.com](http://denispelli.com) |
> >  
> >  
> > 
> > | | | |
> > 
> > |
> >  
> > |
> >  
> >  
> > 
> > | |
> > 
> > |
