From: <ho...@us...> - 2012-05-23 20:56:05
|
Revision: 18643 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18643&view=rev Author: hofman Date: 2012-05-23 20:55:57 +0000 (Wed, 23 May 2012) Log Message: ----------- support Lion full screen, but don't allow the main window to close during full screen Modified Paths: -------------- trunk/bibdesk/BibDocument.m Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2012-05-23 17:34:41 UTC (rev 18642) +++ trunk/bibdesk/BibDocument.m 2012-05-23 20:55:57 UTC (rev 18643) @@ -450,8 +450,8 @@ [aController setWindowFrameAutosaveNameOrCascade:@"Main Window Frame Autosave" setFrame:frameRect]; - //if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) - // [documentWindow setCollectionBehavior:[documentWindow collectionBehavior] | (1 << 7)]; // NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7 + if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) + [documentWindow setCollectionBehavior:[documentWindow collectionBehavior] | (1 << 7)]; // NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7 [documentWindow makeFirstResponder:tableView]; @@ -636,6 +636,13 @@ return YES; } +- (BOOL)windowShouldClose:(id)sender { + // closing the main window during Lion FullScreen mode leads to a crash https://sourceforge.net/tracker/?func=detail&aid=3529044&group_id=61487&atid=497423 + if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && ([documentWindow styleMask] & (1 << 14))) // NSFullScreenWindowMask = 1 << 14 + return NO; + return YES; +} + - (void)windowWillClose:(NSNotification *)notification{ docFlags.isDocumentClosed = YES; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |