Samuel Thibault, le jeu. 22 août 2019 13:16:44 +0200, a ecrit:
Now, thinking more about this, maybe there is a way to make all of this transparent to applications using GtkSocket/GtkPlug: - introduce the at-spi objects I mentioned in my Aug 14th mail - make GtkPlug expose the at-spi path as a _NET_WM property. - make gtk_socket_add_window try to read it, and if it exists, call atk_socket_embed on it That should be working both for the mate-panel implementation mentioned above, and for tray icons. And for anything that uses GtkPlug/Socket.
Here is what is looks like, it looks quite fine in the end, what do people think? Arguably, the AtkPlugExt part could be stuffed into AtkPlug: currently it does not actually implement the ref_child/get_n_children interfaces so subclasses have to implement it anyway. So we could as well have a default implementation which returns 0 children by default, and 1 child if it was built by using a new dedicated atk_plug_new_child(child) allocator which takes the child to be used as parameter. AIUI doing this can't break existing usage, and allows to have it shared by all toolkits needing it instead of putting it in gtk only. Samuel
Attachment:
socketplug
Description: Text document