devdraw: fix fullscreen on Lion

Now, if you full-screen an app running on a secondary
screen, it only takes over that monitor.  It does not cause
the primary screen to disappear.

Code by David Jeannot.

R=djeannot24
http://codereview.appspot.com/5708046
This commit is contained in:
Russ Cox 2012-02-28 14:56:13 -05:00
parent 443d628838
commit 354c6c32f1

View file

@ -908,7 +908,12 @@ togglefs(void)
uint opt, tmp; uint opt, tmp;
#if OSX_VERSION >= 100700 #if OSX_VERSION >= 100700
if(useoldfullscreen==0 || win.isnfs){ NSScreen *s, *s0;
s = [WIN screen];
s0 = [[NSScreen screens] objectAtIndex:0];
if((s==s0 && useoldfullscreen==0) || win.isnfs) {
[WIN toggleFullScreen:nil]; [WIN toggleFullScreen:nil];
return; return;
} }