commit 8edcae589295033f906c065b0afe9851411dfe46
parent 065342058f8c98da98d8bef2affb3174b3ab3457
Author: Russ Cox <rsc@swtch.com>
Date: Thu, 3 Jul 2008 13:34:46 -0400
9vx/OSX: Go full screen on largest screen (thanks to Eric Nichols)
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/9vx/osx/screen.c b/src/9vx/osx/screen.c
@@ -511,6 +511,7 @@ fullscreen(void)
{
static Ptr restore;
static WindowRef oldwindow;
+ GDHandle device;
if(osx.isfullscreen){
EndFullScreen(restore, 0);
@@ -520,7 +521,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();
}