X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fcontrol.cpp;h=50601013acacc985ab256c018693a7f4dc6317ae;hb=051149e5026ff64f3ec477cf19080124b82de619;hp=f3f1919d45815535561932e99c7d23b29b59b16d;hpb=a50eef72fac4b253bd014a32ec43b90e990b5784;p=libs%2Fgui.git diff --git a/source/input/control.cpp b/source/input/control.cpp index f3f1919..5060101 100644 --- a/source/input/control.cpp +++ b/source/input/control.cpp @@ -1,3 +1,4 @@ +#include #include #include "control.h" #include "device.h" @@ -50,12 +51,15 @@ Control::Control(Device &d, ControlSrcType t, unsigned i): connect_signals(); } +Control::~Control() +{ } + void Control::capture(Device &d) { notify_callbacks(); capture_dev = &d; - capture_dev->signal_button_press.connect(sigc::mem_fun(this, &Control::button_press)); - capture_dev->signal_axis_motion.connect(sigc::mem_fun(this, &Control::axis_motion)); + capture_dev->signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Control::button_press), false)); + capture_dev->signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Control::axis_motion), false)); } void Control::cancel_capture() @@ -84,12 +88,12 @@ void Control::connect_signals() case NONE: break; case BUTTON: - src.dev->signal_button_press.connect(sigc::mem_fun(this, &Control::button_press)); - src.dev->signal_button_release.connect(sigc::mem_fun(this, &Control::button_release)); + src.dev->signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Control::button_press), false)); + src.dev->signal_button_release.connect(sigc::bind_return(sigc::mem_fun(this, &Control::button_release), false)); break; case AXIS_POS: case AXIS_NEG: - src.dev->signal_axis_motion.connect(sigc::mem_fun(this, &Control::axis_motion)); + src.dev->signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Control::axis_motion), false)); break; } }