[vlc-commits] macosx: disable window restoration on relaunch for playlist and video windows

Felix Paul Kühne git at videolan.org
Fri May 20 00:29:36 CEST 2011


vlc/vlc-1.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri May 20 00:29:31 2011 +0200| [db18166b8a476ff14e84a0dcd4cc26e9cf1ed07e] | committer: Felix Paul Kühne

macosx: disable window restoration on relaunch for playlist and video windows

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=db18166b8a476ff14e84a0dcd4cc26e9cf1ed07e
---

 modules/gui/macosx/embeddedwindow.m |    4 ++++
 modules/gui/macosx/misc.m           |   10 ++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index a4ffedd..9db6c22 100644
--- a/modules/gui/macosx/embeddedwindow.m
+++ b/modules/gui/macosx/embeddedwindow.m
@@ -135,6 +135,10 @@
                                      view_rect.size.width,
                                      view_rect.size.height )];
     }
+
+    /* we don't want this window to be restored on relaunch */
+    if ([self respondsToSelector:@selector(setRestorable:)])
+        [self setRestorable:NO];
 }
 
 - (void)controlTintChanged
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index d47142a..12fedee 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -227,7 +227,12 @@ static NSMutableArray *blackoutWindows = NULL;
 {
     self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag];
     if( self )
+    {
         b_isset_canBecomeKeyWindow = NO;
+        /* we don't want this window to be restored on relaunch */
+        if ([self respondsToSelector:@selector(setRestorable:)])
+            [self setRestorable:NO];
+    }
     return self;
 }
 - (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey
@@ -427,6 +432,11 @@ static NSMutableArray *blackoutWindows = NULL;
         [self setContentBorderThickness:28.0 forEdge:NSMinYEdge];
     }
     */
+
+    /* we don't want this window to be restored on relaunch */
+    if ([self respondsToSelector:@selector(setRestorable:)])
+        [self setRestorable:NO];
+
     return self;
 }
 



More information about the vlc-commits mailing list