Commit f258e9c7 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Fix various crashes with the fspanel.

Fullscreen is working back.
parent f2f389ba
......@@ -50,8 +50,8 @@
[win setLevel:NSModalPanelWindowLevel];
i_device = 0;
[win center];
hideAgainTimer = fadeTimer = nil;
[self setNonActive:nil];
return win;
}
......@@ -285,14 +285,18 @@
/* get us a valid timer */
if(! b_alreadyCounting )
{
i_timeToKeepVisibleInSec = config_GetInt( VLCIntf, "mouse-hide-timeout" ) / 500;
hideAgainTimer = [NSTimer scheduledTimerWithTimeInterval: 0.5
i_timeToKeepVisibleInSec = var_CreateGetInteger( VLCIntf, "mouse-hide-timeout" ) / 500;
if( hideAgainTimer )
{
[hideAgainTimer invalidate];
[hideAgainTimer autorelease];
}
/* released in -autoHide and -dealloc */
hideAgainTimer = [[NSTimer scheduledTimerWithTimeInterval: 0.5
target: self
selector: @selector(keepVisible:)
userInfo: nil
repeats: YES];
[hideAgainTimer fire];
[hideAgainTimer retain];
repeats: YES] retain];
b_alreadyCounting = YES;
}
}
......@@ -304,15 +308,12 @@
b_keptVisible = NO;
/* count down until we hide ourselfes again and do so if necessary */
i_timeToKeepVisibleInSec -= 1;
if( i_timeToKeepVisibleInSec < 1 )
if( --i_timeToKeepVisibleInSec < 1 )
{
[NSCursor setHiddenUntilMouseMoves: YES];
[self fadeOut];
[timer invalidate];
[timer release];
[hideAgainTimer invalidate]; /* released in -autoHide and -dealloc */
b_alreadyCounting = NO;
timer = NULL;
}
}
......@@ -326,7 +327,7 @@
{
[timer retain];
[fadeTimer invalidate];
[fadeTimer release];
[fadeTimer autorelease];
fadeTimer=timer;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment