From af1b61f55a195350b4491438e8b2c381c4ba34bc Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Sun, 17 May 2009 15:28:42 +0000 Subject: 20090517-1627 --- emu/MacOSX/win.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'emu/MacOSX/win.c') diff --git a/emu/MacOSX/win.c b/emu/MacOSX/win.c index 41ca8d9d..137ab275 100644 --- a/emu/MacOSX/win.c +++ b/emu/MacOSX/win.c @@ -305,7 +305,7 @@ static WindowRef oldWindow = NULL; static void leave_full_screen(void) { - if (0 && amFullScreen) { + if(amFullScreen){ EndFullScreen(fullScreenRestore, 0); theWindow = oldWindow; ShowWindow(theWindow); @@ -321,7 +321,7 @@ leave_full_screen(void) static void full_screen(void) { - if (0 && !amFullScreen) { + if(!amFullScreen){ oldWindow = theWindow; HideWindow(theWindow); BeginFullScreen(&fullScreenRestore, 0, 0, 0, &theWindow, 0, 0); @@ -626,6 +626,8 @@ clipread(void) int i; char *s; + if(appleclip == NULL) + return nil; // Wow. This is ridiculously complicated. PasteboardSynchronize(appleclip); if((err = PasteboardGetItemCount(appleclip, &nitems)) != noErr) { @@ -681,6 +683,8 @@ clipwrite(char *snarf) CFDataRef cfdata; PasteboardSyncFlags flags; + if(appleclip == NULL) + return 0; runeseprint(rsnarf, rsnarf+nelem(rsnarf), "%s", snarf); if(PasteboardClear(appleclip) != noErr){ fprint(2, "apple pasteboard clear failed\n"); -- cgit v1.2.3