diff options
author | Russ Cox <rsc@swtch.com> | 2012-02-28 14:56:13 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2012-02-28 14:56:13 -0500 |
commit | 354c6c32f14f723022eacdfc965b0c9857e787f4 (patch) | |
tree | 8bbeae39fdea658fd63941094f3859fbe18d7e42 /src/cmd | |
parent | 443d6288386f5521efa7d49bc8ea5be04f5fd696 (diff) | |
download | plan9port-354c6c32f14f723022eacdfc965b0c9857e787f4.tar.gz plan9port-354c6c32f14f723022eacdfc965b0c9857e787f4.tar.bz2 plan9port-354c6c32f14f723022eacdfc965b0c9857e787f4.zip |
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
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/devdraw/cocoa-screen.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m index 97ddd80c..bf2d0fdc 100644 --- a/src/cmd/devdraw/cocoa-screen.m +++ b/src/cmd/devdraw/cocoa-screen.m @@ -908,7 +908,12 @@ togglefs(void) uint opt, tmp; #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]; return; } |