tdevdraw: OS X: go full screen on largest device (Eric Nichols) - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit cdead40b9bb4b40469d3aa3c31ec30904113114f
DIR parent e05b0ff3ebd8086809714527a27b412345ff4d72
HTML Author: Russ Cox <rsc@swtch.com>
Date: Thu, 3 Jul 2008 13:35:12 -0400
devdraw: OS X: go full screen on largest device (Eric Nichols)
Diffstat:
M src/cmd/devdraw/osx-screen.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
DIR diff --git a/src/cmd/devdraw/osx-screen.c b/src/cmd/devdraw/osx-screen.c
t@@ -529,6 +529,7 @@ fullscreen(void)
{
static Ptr restore;
static WindowRef oldwindow;
+ GDHandle device;
if(osx.isfullscreen){
EndFullScreen(restore, 0);
t@@ -538,7 +539,8 @@ fullscreen(void)
}else{
HideWindow(osx.window);
oldwindow = osx.window;
- BeginFullScreen(&restore, 0, 0, 0, &osx.window, 0, 0);
+ GetWindowGreatestAreaDevice(osx.window, kWindowTitleBarRgn, &device, nil);
+ BeginFullScreen(&restore, device, 0, 0, &osx.window, 0, 0);
osx.isfullscreen = 1;
osx.fullscreentime = msec();
}