ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved