Skip to content

Commit 6b554e7

Browse files
committed
macosx: Constrain fscontroller hide-timeout
This constrains timeout to non-zeor. Initializing the timer with 0 seconds will make it fire every 0.1 milliseconds instead, which is too freqeuntly. It caused the fscontroller to flicker between animation states and never be fully visible, which is addressed by forcing a value of at least 1 second.
1 parent 7af395d commit 6b554e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/gui/macosx/VLCFSPanelController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,9 @@ - (void)startAutohideTimer
345345
if (_isCounting)
346346
return;
347347

348-
int _timeToKeepVisibleInSec = var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000;
348+
/* Get timeout and make sure it is not lower than 1 second */
349+
int _timeToKeepVisibleInSec = MAX(var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000, 1);
350+
349351
_hideTimer = [NSTimer scheduledTimerWithTimeInterval:_timeToKeepVisibleInSec
350352
target:self
351353
selector:@selector(autohideCallback:)

0 commit comments

Comments
 (0)