genxproj - embedding on X

An X11 application can be embedded in a window of another X11 application using various methods, such as XEmbed or running a pseudo X server within the window. The former needs applications to be prepared for embedding, thus can not be used with genxproj. Running an extra X server, such as xnest or xypher may be a resource-hungry operation.

Therefor genxproj chosen a third method: code injection using LD_PRELOAD. The injected code is a tiny dynamic lib that hooks the X11 function call for creating windows. Most calls are relayed to the real Xlib functions transparently, except:

In a sense genxproj is similar to a window manager: it places and sizes the main window of applications and manages hiding/showing the popup windows as well. However, it can not be implemented as a real window manager: that would suppress the user's preferred window manager.