[vlc-commits] macosx: Constrain fscontroller hide-timeout
Marvin Scholz
git at videolan.org
Tue Dec 13 14:46:25 CET 2016
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Dec 13 14:45:07 2016 +0100| [6b554e77499e02eed6793e1fb44c3667d23ba0ef] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b554e77499e02eed6793e1fb44c3667d23ba0ef
---
modules/gui/macosx/VLCFSPanelController.m | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/gui/macosx/VLCFSPanelController.m b/modules/gui/macosx/VLCFSPanelController.m
index 92a70d1..19a7f91 100644
--- a/modules/gui/macosx/VLCFSPanelController.m
+++ b/modules/gui/macosx/VLCFSPanelController.m
@@ -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:)
More information about the vlc-commits
mailing list