From: Mikko Rasa Date: Thu, 25 Apr 2013 12:27:28 +0000 (+0300) Subject: Fix event connections in the event example X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4464dd5d973c47f6d7a7c352a90bd88cdb717cd2;p=libs%2Fgui.git Fix event connections in the event example --- diff --git a/examples/ev.cpp b/examples/ev.cpp index 5a338e7..96a2f9e 100644 --- a/examples/ev.cpp +++ b/examples/ev.cpp @@ -35,12 +35,12 @@ Ev::Ev(int, char **): mouse(window) { window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &Ev::exit), 0)); - keyboard.signal_button_press.connect(sigc::mem_fun(this, &Ev::key_press)); - keyboard.signal_button_release.connect(sigc::mem_fun(this, &Ev::key_release)); - keyboard.signal_character.connect(sigc::mem_fun(this, &Ev::character)); - mouse.signal_button_press.connect(sigc::mem_fun(this, &Ev::button_press)); - mouse.signal_button_release.connect(sigc::mem_fun(this, &Ev::button_release)); - mouse.signal_axis_motion.connect(sigc::mem_fun(this, &Ev::axis_motion)); + keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Ev::key_press), false)); + keyboard.signal_button_release.connect(sigc::bind_return(sigc::mem_fun(this, &Ev::key_release), false)); + keyboard.signal_character.connect(sigc::bind_return(sigc::mem_fun(this, &Ev::character), false)); + mouse.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Ev::button_press), false)); + mouse.signal_button_release.connect(sigc::bind_return(sigc::mem_fun(this, &Ev::button_release), false)); + mouse.signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Ev::axis_motion), false)); window.show(); }