]> git.tdb.fi Git - libs/gui.git/commitdiff
Fix event connections in the event example
authorMikko Rasa <tdb@tdb.fi>
Thu, 25 Apr 2013 12:27:28 +0000 (15:27 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 25 Apr 2013 12:27:28 +0000 (15:27 +0300)
examples/ev.cpp

index 5a338e7355b9dedb1565812cbb92e1ae007f2d98..96a2f9eb45c0bcf39c1496c17cff06d466a90f1b 100644 (file)
@@ -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();
 }