diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-07-20 21:26:15 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-07-20 21:26:15 +0200 |
| commit | 2f718ee4e6b1f26100a6970ed41b2c9378e6346f (patch) | |
| tree | 1b73cac9c8fdbc34d0bbdb74062bce33e9c7c8c1 | |
| parent | eedc3e67a59761d33bdad8953cc87537d5a5d5b4 (diff) | |
EdgeBarrierController: disable the lambda based proxy version
Nux does not support that yet (bzr r2509.1.30)
| -rw-r--r-- | launcher/EdgeBarrierController.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/launcher/EdgeBarrierController.cpp b/launcher/EdgeBarrierController.cpp index 54d21d7ba..f01e1090d 100644 --- a/launcher/EdgeBarrierController.cpp +++ b/launcher/EdgeBarrierController.cpp @@ -35,6 +35,21 @@ struct EdgeBarrierController::Impl void OnPointerBarrierEvent(PointerBarrierWrapper* owner, BarrierEvent::Ptr event); void BarrierRelease(PointerBarrierWrapper* owner, int event); + bool StickyEdgeSetter(bool const& new_val) + { + if (parent_->options() && new_val != parent_->options()->edge_resist()) + { + parent_->options()->edge_resist = new_val; + return true; + } + return false; + } + + bool StickyEdgeGetter() + { + return parent_->options() ? parent_->options()->edge_resist() : false; + } + std::vector<PointerBarrierWrapper::Ptr> barriers_; std::vector<EdgeBarrierSubscriber*> subscribers_; Decaymulator decaymulator_; @@ -57,6 +72,10 @@ EdgeBarrierController::Impl::Impl(EdgeBarrierController *parent) SetupBarriers(layout); }); + parent_->sticky_edges.SetGetterFunction(sigc::mem_fun(this, &Impl::StickyEdgeGetter)); + parent_->sticky_edges.SetSetterFunction(sigc::mem_fun(this, &Impl::StickyEdgeSetter)); + +/* Set this back, once lp:~3v1n0/nux/use-std-function is merged parent_->sticky_edges.SetGetterFunction([parent_] { return parent_->options() ? parent_->options()->edge_resist() : false; }); @@ -69,6 +88,7 @@ EdgeBarrierController::Impl::Impl(EdgeBarrierController *parent) } return false; }); + */ parent_->options.changed.connect([&](launcher::Options::Ptr options) { options->option_changed.connect([&]() { |
