[vlc-commits] macosx: fix slider redraw broken in current Firefox releases due to the lack of reliable UI updates
Felix Paul Kühne
git at videolan.org
Wed Sep 9 15:09:05 CEST 2015
npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Sep 9 14:56:43 2015 +0200| [de857cc532c0093c070a1b65c6390c49cf0f12c1] | committer: Felix Paul Kühne
macosx: fix slider redraw broken in current Firefox releases due to the lack of reliable UI updates
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=de857cc532c0093c070a1b65c6390c49cf0f12c1
---
extras/macosx/dmg_setup.scpt | Bin 4826 -> 4826 bytes
npapi/vlcplugin_mac.mm | 13 ++++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/extras/macosx/dmg_setup.scpt b/extras/macosx/dmg_setup.scpt
index 1a58783..72eee0e 100644
Binary files a/extras/macosx/dmg_setup.scpt and b/extras/macosx/dmg_setup.scpt differ
diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm
index ebb7caa..571cb67 100644
--- a/npapi/vlcplugin_mac.mm
+++ b/npapi/vlcplugin_mac.mm
@@ -319,8 +319,11 @@ NPError VlcPluginMac::get_root_layer(void *value)
if (strstr(userAgent, "Safari") && strstr(userAgent, "Version/5")) {
NSLog(@"Safari 5 detected, deploying UI update timer");
[[(VLCPerInstanceStorage *)this->_perInstanceStorage browserRootLayer] performSelector:@selector(startUIUpdateTimer) withObject:nil afterDelay:1.];
- } else if (strstr(userAgent, "Firefox"))
+ } else if (strstr(userAgent, "Firefox")) {
+ NSLog(@"Firefox detected, deploying UI update timer");
this->runningWithinFirefox = true;
+ [[(VLCPerInstanceStorage *)this->_perInstanceStorage browserRootLayer] performSelector:@selector(startUIUpdateTimer) withObject:nil afterDelay:1.];
+ }
[(VLCPerInstanceStorage *)this->_perInstanceStorage setNoMediaLayer:[[VLCNoMediaLayer alloc] init]];
[(VLCPerInstanceStorage *)this->_perInstanceStorage noMediaLayer].opaque = 1.;
@@ -360,8 +363,10 @@ bool VlcPluginMac::handle_event(void *event)
CGPoint point = CGPointMake(cocoaEvent->data.mouse.pluginX,
// Flip the y coordinate
npwindow.height - cocoaEvent->data.mouse.pluginY);
- if ([(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] != nil)
+ if ([(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] != nil) {
[[(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] handleMouseDown:[[(VLCPerInstanceStorage *)this->_perInstanceStorage browserRootLayer] convertPoint:point toLayer:[(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer]]];
+ [[(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] setNeedsDisplay];
+ }
return true;
}
@@ -375,8 +380,10 @@ bool VlcPluginMac::handle_event(void *event)
// Flip the y coordinate
npwindow.height - cocoaEvent->data.mouse.pluginY);
- if ([(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] != nil)
+ if ([(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] != nil) {
[[(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] handleMouseUp:[[(VLCPerInstanceStorage *)this->_perInstanceStorage browserRootLayer] convertPoint:point toLayer:[(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer]]];
+ [[(VLCPerInstanceStorage *)this->_perInstanceStorage controllerLayer] setNeedsDisplay];
+ }
return true;
}
More information about the vlc-commits
mailing list