[Vala] grabbing keyboard focus with GtkClutterEmbed
- From: James Moschou <james moschou gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] grabbing keyboard focus with GtkClutterEmbed
- Date: Fri, 20 Aug 2010 15:53:37 +0930
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]