summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/Controller.mm14
-rw-r--r--macosx/HBPreviewController.mm9
-rw-r--r--macosx/PictureController.h2
-rw-r--r--macosx/PictureController.mm10
4 files changed, 26 insertions, 9 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 287b4944b..2e73266dc 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -208,9 +208,14 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) app
{
- if ([fPreviewController fullScreen] == YES)
+ /* if we are in preview full screen mode, we need to go to
+ * windowed mode and release the display before we terminate.
+ * We do it here (instead of applicationWillTerminate) so we
+ * release the displays and can then see the alerts below.
+ */
+ if ([fPictureController previewFullScreenMode] == YES)
{
- [fPreviewController goWindowedScreen:nil];
+ [fPictureController previewGoWindowed:nil];
}
hb_state_t s;
@@ -250,13 +255,14 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
- (void)applicationWillTerminate:(NSNotification *)aNotification
{
- [browsedSourceDisplayName release];
+
+ [browsedSourceDisplayName release];
[outputPanel release];
[fQueueController release];
+ [fPreviewController release];
[fPictureController release];
[fPictureFilterController release];
- [fPreviewController release];
hb_close(&fHandle);
hb_close(&fQueueEncodeLibhb);
}
diff --git a/macosx/HBPreviewController.mm b/macosx/HBPreviewController.mm
index 39106c9b9..ec7862b0c 100644
--- a/macosx/HBPreviewController.mm
+++ b/macosx/HBPreviewController.mm
@@ -108,6 +108,8 @@ return YES;
- (void)windowWillClose:(NSNotification *)aNotification
{
+
+
/* Upon Closing the picture window, we make sure we clean up any
* preview movie that might be playing
*/
@@ -118,10 +120,6 @@ return YES;
[fPictureView setHidden:NO];
[fMovieView pause:nil];
[fMovieView setHidden:YES];
- if (isFullScreen)
- {
- [self goWindowedScreen:nil];
- }
isFullScreen = NO;
hudTimerSeconds = 0;
@@ -130,7 +128,8 @@ return YES;
- (BOOL)windowShouldClose:(id)fPictureWindow
{
- return YES;
+
+ return YES;
}
- (void) dealloc
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
index 01dd7eebb..756488155 100644
--- a/macosx/PictureController.h
+++ b/macosx/PictureController.h
@@ -73,6 +73,8 @@
- (void)setHBController: (HBController *)controller;
- (IBAction) showPictureWindow: (id)sender;
- (IBAction) showPreviewWindow: (id)sender;
+- (BOOL) previewFullScreenMode;
+- (IBAction) previewGoWindowed: (id)sender;
- (IBAction) showFilterWindow: (id)sender;
diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm
index fa76a996a..30409d9e0 100644
--- a/macosx/PictureController.mm
+++ b/macosx/PictureController.mm
@@ -56,6 +56,16 @@
}
}
+- (BOOL) previewFullScreenMode
+{
+ return [fPreviewController fullScreen];
+}
+
+- (IBAction) previewGoWindowed: (id)sender
+{
+ [fPreviewController goWindowedScreen:self];
+}
+
- (IBAction) showPreviewWindow: (id)sender
{
[fPreviewController showWindow:sender];