Re: Erro with "key-press-event" signal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-05-31 at 09:52 -0300, frederico schardong wrote:
> Just a attention error, thank you.

Fixing all compile warnings in your code is usually helpful.

--mitch

> 2010/5/31 David Nečas <yeti@xxxxxxxxxxxxxxx>:
> > On Mon, May 31, 2010 at 09:47:26AM -0300, frederico schardong wrote:
> >> I have a window with a callback to resolve the "key-press-event"
> >> signal. The callback is:
> >>
> >> gboolean alterCurrentTab(GtkWidget widget, GdkEventKey *event,
> >> gpointer user_data)
> >> {
> >>     g_print("\nkey: %s - %d - %lu", gdk_keyval_name(event->keyval),
> >> event->state, event->hardware_keycode);
> >>     return FALSE;
> >> }
> >>
> >> The problem is that the return is always:
> >> key: (null) - -15694833 - 51081
> >>
> >> Obs: I'm using the gtk_widget_set_events(window, GDK_KEY_PRESS_MASK);
> >> on this window.
> >>
> >> What I'm doing wrong?
> >
> > If you really declare the first argument as GtkWidget widget instead of
> > GtkWidget *widget then you get complete rubbish in the function
> > arguments.
> >
> > Yeti


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux