summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-03-03 23:59:58 +0000
committerCarl Hetherington <cth@carlh.net>2019-03-04 08:05:05 +0000
commite14f261a6a0ec1c3047db37ce55655fa095a6b08 (patch)
tree5298c1cd177c9d2f3237947cd633e1cf8aea5783
parent4fa689435abb7f0c2bd07854e0817b6b040d40c7 (diff)
Fix non-movement of position slider and label after dragging
the position slider on OS X (probably #1452).
-rw-r--r--src/wx/controls.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wx/controls.cc b/src/wx/controls.cc
index 5e68baaa0..3e0666460 100644
--- a/src/wx/controls.cc
+++ b/src/wx/controls.cc
@@ -120,6 +120,13 @@ Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool editor
_slider->Bind (wxEVT_SCROLL_PAGEUP, boost::bind(&Controls::slider_moved, this, true));
_slider->Bind (wxEVT_SCROLL_PAGEDOWN, boost::bind(&Controls::slider_moved, this, true));
_slider->Bind (wxEVT_SCROLL_CHANGED, boost::bind(&Controls::slider_released, this));
+#ifdef DCPOMATIC_OSX
+ /* _CHANGED is not received on OS X (at least, not when the
+ slider is dragged), so use this instead. Perhaps all
+ platforms could just use _THUMBRELEASE.
+ */
+ _slider->Bind (wxEVT_SCROLL_THUMBRELEASE, boost::bind(&Controls::slider_released, this));
+#endif
_rewind_button->Bind (wxEVT_LEFT_DOWN, boost::bind(&Controls::rewind_clicked, this, _1));
_back_button->Bind (wxEVT_LEFT_DOWN, boost::bind(&Controls::back_clicked, this, _1));
_forward_button->Bind (wxEVT_LEFT_DOWN, boost::bind(&Controls::forward_clicked, this, _1));