[TCLCORE] Tk embedding and xembed
by Marcelo Taube other posts by this author
May 29 2009 1:32PM messages near this date
[TCLCORE] TDBC 1.0b11 released
|
Re: [TCLCORE] Tk embedding and xembed
Hello,
I am a developer trying to embed a tk application inside a gtk application.
It doesn't work that well, specially there are focus problems.
I have done some debugging of the problem. Gtk assumes that the embedded
window will implement the XEMBED conventions protocol, but Tk uses a model
which is more based on the older concepts of focus of X11.
Gtk usually grabs the XServer focus to its main window and passes keyboard
events down to the subwindows holding the "gtk focus" by its own subsystems,
in contrast Tk respects much more the original meaning of the XServer focus.
I think Tk is right in some way, because the original intention of the X
protocol was to have toolkits use the X focus as their focus. However since
the release of the original protocol specification, most of the x11 experts
agreed that is logical to expect applications to grab the focus to their
main window. Thats why the XEMBED protocol was released.
GTK respects XEMBED and sends X_EMBED_FOCUS_IN and X_EMBED_FOCUS_OUT
messages instead of regular FocusIn and FocusOut events to the X server. Tk
insists on recieving the regular events and they just cannot communicate
well.
I would like to know if XEMBED was not implemented in Tk as ideological
decision or just because noone is willing to write it. If that is the case i
would like to volunteer to do the job, since i really need that feature.
Thanks
Marcelo
Thread:
Marcelo Taube
Donal K. Fellows
|