Embed an app into a window

青春壹個敷衍的年華 提交于 2019-11-30 14:14:30

the only supported and reliable mechanism is XEmbed, but it requires the embedded app to cooperate. Without a cooperating app, you're in a world of scary hacks.

The basic thing you need to do is XReparentWindow() but the problem is that you're fighting the window manager which will also want to reparent the window. You're also potentially confusing the app, which will be expecting ICCCM and EWMH behavior, and expecting the parent window to be a WM frame.

Really old GNOME 1.x versions of gnome panel had a swallow feature you could try to steal hacks from maybe.

Without pretty extensive X knowledge this will be painful, and even with it's not necessarily possible to make 100% reliable.

It looks like you are looking for the XEmbed protocol, documented here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!