Re: Automatic focus handling? How do I turn it off?
- From: Paul Davis <pbd Op Net>
- To: Ken Simpson <kens ActiveState com>
- Cc: Havoc Pennington <hp redhat com>, gtk-list gnome org, blizzard redhat com, David Ascher <DavidA ActiveState com>, Mark Hammond <markh ActiveState com>
- Subject: Re: Automatic focus handling? How do I turn it off?
- Date: Tue, 12 Jun 2001 07:59:27 -0400
>I apologize if I wasn't clear in my email. The problem is that pressing
>keys such as the arrow keys, the backspace, and the tab cause my widget to
>lose focus and for its containing window to gain focus. The key press
>event first hits my widget and then, once I have returned 0 from the
>key_press handler, control returns to gtk, the focus is removed, and the
>event is propagated to the containing window where it is handled.
>
>So I suppose it could have something to do with gtk's support for moving
>the focus with tab, etc.. How does one turn this functionality off?
you can't turn it off per se. you have two choices:
1) on a per-widget basis, catch key_press/key release events. if they
are for one of the navigation keys, do nothing except:
gtk_signal_emit_block_by_name (...);
return TRUE;
2) install a global key snooper, inspect all key press events, and
discard or translate the navigation keys.
and yes, i don't like it any more than you do :)
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]