[vlc-commits] [Git][videolan/vlc][master] macosx: Prevent updating of the time slider position while it is being grabbed
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sun Jun 1 08:35:52 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
fbb2e21c by Claudio Cambra at 2025-06-01T08:20:25+00:00
macosx: Prevent updating of the time slider position while it is being grabbed
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.m
Changes:
=====================================
modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.m
=====================================
@@ -62,6 +62,7 @@
NSTimeInterval last_bwd_event;
BOOL just_triggered_next;
BOOL just_triggered_previous;
+ BOOL _isTimeSliderBeingDragged;
VLCPlayQueueController *_playQueueController;
VLCPlayerController *_playerController;
@@ -108,6 +109,7 @@
object:nil];
_nativeFullscreenMode = var_InheritBool(getIntf(), "macosx-nativefullscreenmode");
+ _isTimeSliderBeingDragged = NO;
self.dropView.drawBorder = NO;
@@ -356,16 +358,9 @@
}
switch (NSApp.currentEvent.type) {
- case NSEventTypeLeftMouseUp:
- /* Ignore mouse up, as this is a continuous slider and
- * when the user does a single click to a position on the slider,
- * the action is called twice, once for the mouse down and once
- * for the mouse up event. This results in two short seeks one
- * after another to the same position, which results in weird
- * audio quirks.
- */
- return;
case NSEventTypeLeftMouseDown:
+ _isTimeSliderBeingDragged = YES;
+ break;
case NSEventTypeLeftMouseDragged:
case NSEventTypeScrollWheel:
{
@@ -374,6 +369,9 @@
self.timeSlider.floatValue = newPosition;
break;
}
+ case NSEventTypeLeftMouseUp:
+ _isTimeSliderBeingDragged = NO;
+ break;
default:
return;
}
@@ -412,6 +410,10 @@
- (void)updateTimeSlider:(NSNotification *)aNotification;
{
+ if (_isTimeSliderBeingDragged) {
+ return;
+ }
+
VLCInputItem * const inputItem = _playerController.currentMedia;
const BOOL validInputItem = inputItem != nil;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fbb2e21ca6170985fa2156bb2eab92d2c4cc405d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fbb2e21ca6170985fa2156bb2eab92d2c4cc405d
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list