How do GUI tools interact with window managers in Linux?

What is the main mechanism by which GUI tools (like Qt, GTK) work in conjunction with window managers?

As I understand it, the GUI toolkit can draw its own window without requiring a window manager. However, the point that confuses me is when and how the window manager detects a "new window request" on the x server and draws its frames, headers, etc. Around this window? Of course, some kind of implicit coordination is required. However, from a coding point of view, the window manager initializations appear completely transparent to the GUI toolboxes.

Is it fair to say that both GUI toolkits and window managers are 2 x window peer clients? Is it the responsibility of the x server to call (notify) window managers to be involved in the process of creating a new window? If so, who determines the position of the "application window" when there is no window manager?

+3


source to share


2 answers


The main communication mechanism is through windows properties. The starting point for the search is ICCCM , in particular Chapter 4 . This covers things like window decorations and buttons.

Modern desktop systems greatly extend the conventions described in ICCCM, see standards /freedesktop.org/wm-spec for more information. These extensions cover things like pagers and taskbars.

In addition, the window manager has special privileges, namely: it can see and intercept all of the window configuration, resizing and display settings. This is called a redirect, see for example here . I think you are mainly interested in this kind of communication.



Only one client at a time can perform a redirect, this client is defined as a window manager. In all other respects, clients are peers.

All requests to create / configure a window include the coordinates of the window. Window managers can intercept and modify these coordinates. If there is no window manager, requests are made by the X server in the same way that applications send them.

+2


source


Well, everything is ultimately coordinated through the X server. Do some reading and I believe you will find the answers you are looking for ...

Some general information:

http://en.wikipedia.org/wiki/X_Window_System_protocols_and_architecture#Inter-client_communication



http://en.wikipedia.org/wiki/X_window_manager#How_X_window_managers_work

Xlib firmware guide - especially chapters 9, 10, and 14:

http://tronche.com/gui/x/xlib/

0


source







All Articles