Embed non gtk apps in gtk widget

Hello I have a question? Is it possible to reparent non gtk window (other kind of x11 windows such as qt or apps which use xlib or xcb lib) to a gtk widget? I know qt can embed multiples kind of windows in a widget.

As far as I wouldn’t recommend doing so, it’s possible, at least up to GTK3. You have GtkPlug for that purpose.
It however has more peculiarities than one should like, although in simple setups it looks like it just works.

This uses XEmbed for seemingly “just working”. You could also theoretically manually embed any windows under X so long as the two sides are more or less cooperating, but loads of things are tricky and complicated if you want bidirectional input or any kind of integration thereof.

Basically, unless you really can’t do any other way, I wouldn’t recommend embedding 3rd party windows. As a hint, all area that I ever heard relying on this are trying to move away from the scheme, and for good reasons.

Ok but I think a lot more simple than rewrite a part of a source code app.
But if you add GtkPlug in a program that use xlib will it works or you have to add it in a gtk app?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.