Re: [Vala] grabbing keyboard focus with GtkClutterEmbed



SORRY! wrong mailing list ... just ignore this

On 20 August 2010 15:53, James Moschou <james moschou gmail com> wrote:
Hello

This is probably more of a Gtk question than a Clutter question. I
have a GtkClutter.Embed in my application, which has an actor that
responds to keyboard events from every key (it's a text view). The
problem is that when I press the arrow keys, the focus changes from
the actor to the surrounding widgets, when really I want the actor to
handle the arrow key presses to move the cursor.

I have:

embed.button_release_event.connect (() => {
   embed.grab_focus ();
   return false;
});

which activates the stage, then:

this.button_release_event.connect (this.button_release); // Which
calls this.grab_key_focus () in the callback
this.key_press_event.connect (this.key_press); // This callback works
fine until I press one of the arrow keys


Cheers
James




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