[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:30:59 CEST 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri May 20 00:30:46 2011 +0200| [370891772f5b599067ecb10e0cc0fff5d46dbfc9] | committer: Felix Paul Kühne

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

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

 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 4c915c4..56d4d5f 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 a99f01a..c20f835 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