Re: Pass keystrokes to other window
- From: Santiago Capel Torres <bluefish ono com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Pass keystrokes to other window
- Date: Tue, 04 Dec 2001 03:49:29 -0100
Thank you.
I am sure that the windows are not the same, in fact one is the parent of
the other. It is working fine now ;-)
I have made another "hack" with the events to achieve the same efect with
the TAB key than with the SPACE key in a Clist. In the key_press_event, I
have made:
if( event->keyval == GDK_Tab ) {
event->keyval = GDK_space
return FALSE;
}
and it works perfectly.
Does anybody knows how to make this in another way?
Havoc Pennington escribió:
Santiago Capel Torres <bluefish ono com> writes:
Hello list: some time ago I sent a message asking how could I resend
a message to another window. I have made this and it is working, but
I would like to know if this is correct:
gdk_window_unref(event->window);
event->window = otherwindow;
gdk_window_ref(event->window);
gdk_event_put(event);
Well, be sure event->window and otherwindow aren't the same, note that
it's broken if they are (you might kill event->window on the first
line).
It's probably pretty dangerous anyway; GDK/GTK certainly doesn't
expect you to do that, and you could break some assumptions of the
system. Also, the event may contain window-specific fields such as
coordinates.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]