Re: Pass keystrokes to other window



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]