| tdevdraw: fix fullscreen on Lion - plan9port - [fork] Plan 9 from user space | |
| git clone git://src.adamsgaard.dk/plan9port | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 354c6c32f14f723022eacdfc965b0c9857e787f4 | |
| parent 443d6288386f5521efa7d49bc8ea5be04f5fd696 | |
| Author: Russ Cox <[email protected]> | |
| Date: Tue, 28 Feb 2012 14:56:13 -0500 | |
| 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 | |
| tthe primary screen to disappear. | |
| Code by David Jeannot. | |
| R=djeannot24 | |
| http://codereview.appspot.com/5708046 | |
| Diffstat: | |
| M src/cmd/devdraw/cocoa-screen.m | 7 ++++++- | |
| 1 file changed, 6 insertions(+), 1 deletion(-) | |
| --- | |
| diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m | |
| t@@ -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; | |
| } |