Commit 6b554e77 authored by Marvin Scholz's avatar Marvin Scholz

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.
parent 7af395db
......@@ -345,7 +345,9 @@
if (_isCounting)
return;
int _timeToKeepVisibleInSec = var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000;
/* Get timeout and make sure it is not lower than 1 second */
int _timeToKeepVisibleInSec = MAX(var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000, 1);
_hideTimer = [NSTimer scheduledTimerWithTimeInterval:_timeToKeepVisibleInSec
target:self
selector:@selector(autohideCallback:)
......
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