# WIN: Screen(&#39;WindowToBack&#39;) hangs Matlab (R14)

**URL:** <https://psychtoolbox.discourse.group/t/win-screen-39-windowtoback-39-hangs-matlab-r14/711>\
**Category:** Uncategorized\
**Created:** [January 5, 2005, 6:52pm UTC](https://psychtoolbox.discourse.group/t/win-screen-39-windowtoback-39-hangs-matlab-r14/711 "2005-01-05T18:52:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![josephtyw](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@josephtyw](https://psychtoolbox.discourse.group/u/josephtyw)\
**Post date:** [January 5, 2005, 6:52pm UTC](https://psychtoolbox.discourse.group/t/win-screen-39-windowtoback-39-hangs-matlab-r14/711/1 "2005-01-05T18:52:50Z")

</div>

I am a new user of PTB, and I searched but did not find anything   
reported on "WindoToBack":  
  
In the windows version of PTB, I tried:  
  
window = Screen(0,'OpenWindow');  
GetChar; % Do something else  
Screen(window,'WindowToBack');  
GetChar;  
Screen('CloseAll');  
  
After sending the main window to the background, the Matlab command   
window hangs and does not respond to the keystroke given to it. I   
had to use task manager to shut down matlab entirely.  
  
Does this have something to do with the fact PTB for Win has the bug   
Screen rejects a pointer to the Matlab command window"? On the   
website ([http://psychtoolbox.org/win.html#bugs)](http://psychtoolbox.org/win.html#bugs)) it only   
says "WindowToFront" would fail if you give it the Matlab command   
window pointer...  
  
Or, is my PTB or Matlab not up-to-date?  
  
I use WinXP SP2, PTB 2.54(20 Jan. 2004), and Matlab 7.0.0.19920   
(R14).  
Thanks in advanced!  
  
Joseph
