Re: sigc not sending 'c'
- From: Bruce Sherwood <Bruce_Sherwood ncsu edu>
- To: gtkmm-list gnome org
- Subject: Re: sigc not sending 'c'
- Date: Fri, 13 Jul 2007 10:32:57 -0600
Thanks much for making this test. I should have said that the widget is
DrawingArea. The context is VPython where until the new beta version
(see "Recent developments" at vpython.org) we were using gtk1 but are
now using gtk2 to create a window and a DrawingArea widget used for
OpenGL 3D displays. Keyboard input isn't used much with VPython, so the
missing 'c' wasn't immediately noticed.
I should also clarify possible ambiguity in my original note. I don't
receive 'c' with either the one-argument version of connect or the
two-argument version (with the second argument "false").
Bruce
Naveen Verma wrote:
Hi,
On two different laptops running Ubuntu and using sigc 2.0, I have the
bizarre situation that all keypresses generate events except
lower-case
'c' (shift-c does generate an event, as do alt-c, ctrl-c, and
ctrl-alt-c). Here is the connect statement (and the keypress handler
returns true):
area->signal_key_press_event().connect(
sigc::mem_fun( *this, &display::on_key_pressed));
Though I couldn't find any documentation on an optional second argument,
I did find a note from someone who added a second argument, "false", as
shown below (and then returned true from the keypress handler,
supposedly to alert sigc not to do any more processing):
area->signal_key_press_event().connect(
sigc::mem_fun( *this, &display::on_key_pressed), false);
I haven't a clue what to try to fix the problem. Any ideas?
I have tried to test it by connecting the key press event with a button,
and it works properly. I tried to print the character also, and it
prints c, C and all other characters as I press. Well I just connect like:
button_.signal_key_press_event().connect(sigc::mem_fuc(*this,
&TestWindow::handleKeyPress));
I am using sigc++2.0.
With which widget you a connecting the event?
-Br
Naveen
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org <mailto:gtkmm-list gnome org>
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]