| Store | Cart

[TCLCORE] Tk embedding and xembed

From: Marcelo Taube <mail...@gmail.com>
Fri, 29 May 2009 23:27:10 +0300
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

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Marcelo Taube May 29, 2009 08:27 pm
Donal K. Fellows May 30, 2009 12:42 am
Messages in this thread