Question about gtkglarea



Hello!

I'm trying to set the eventes to be managed by glarea; i tried the
following:

     gtk_widget_set_events(GTK_WIDGET(glarea),
                            GDK_EXPOSURE_MASK|
                            GDK_KEY_PRESS_MASK|
                           GDK_BUTTON_PRESS_MASK);

but glarea wasn't getting any event from the keyboard, so i did this:

  gtk_widget_set_events(GTK_WIDGET(window),  GDK_KEY_PRESS_MASK);
......

     gtk_widget_set_events(GTK_WIDGET(glarea),
                            GDK_EXPOSURE_MASK|
                           GDK_BUTTON_PRESS_MASK);

......
  gtk_container_add(GTK_CONTAINER(window),GTK_WIDGET(glarea));

It works, but i don't like very much.
My question is: ¿There exists some way of force glarea to intercept the
keyboard events?

Thanks in advance

    Juan Pablo



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