What is the basic mechanism that make GUI toolkits (such as Qt, GTK) work together with the window managers?
As far as I understood, GUI toolkits can draw their own main window without requiring any window manager. However the point that confuses me is when and how a window manager detects a "new window request" in the x-server and draws its frames, titles etc around this window? Certainly some kind of implicit coordination is required. However, from the coding point of view, the window manager initializations seem completely transparent to GUI toolkits.
Is it true to say that both GUI toolkits and window managers are 2 peer clients of x window? Is it the x-server responsibility to call (notify) window managers to involve in new window creation process? If this is the case, who determines the position of the "application window" when there is no window manager?