Purpose: discuss what function a window manager has and what [Tk] can and cannot do with the help of a window manager, etc. ---- In the [X] Windowing System, there is (usually; we exclude situations like [web] kiosks here) a single special application whose responsibility is to look after the arrangement of windows (e.g., allowing people to drag them around and resize them) and the look and feel of the decorations of the window (title bar, frame, etc.). This application is called the '''Window Manager'''. On [Windows] and [Macintosh]es, that responsibility is divided up slightly differently internally, but the net result is usually the same. (You should only see a significant difference when something crashes, and that shouldn't happen in the first place!) Typically, applications communicate with window managers by providing them with ''hints''; they can ask to be a certain size and at a certain position, but ultimately if the WM decides to put the window somewhere else (e.g., because the user moved or resized it) then there's nothing that the app can do about it. Nor ''should'' there be anything that the app can do about it; the user should be in control after all. ---- Interesting related reading: an emerging window manager specification that extends [ICCCM]: [http://www.freedesktop.org/standards/wm-spec.html]. See this recent article with members of freedesktop regarding their views of the direction desktop applications and libraries are headed [http://www.osnews.com/story.php?news_id=5215] [[pertinence of xprop]] [DKF]: '''xprop'''? To understand that, you need to understand that every X window has a set of mappings called ''properties'' associated with it. Each is a mapping from an XAtom to a typed bunch of bytes. All sorts of things (including quite a lot of window management) are done using this mechanism, most of which Tk conceals from you (and with good reason; it's a very low level mechanism.) xprop is a little utility that allows you to probe these properties. Note that programs can also ask for an event whenever window properties change, and this is the foundation of all sorts of things (including the [send] mechanism on Unix/X systems.) [[examples]] Window managers that use [Tcl/Tk]: * arswm (at one time available from mailto:burdick@ars.rtp.nc.us) (Bill Burdick) * [Panache] [http://www.xmission.com/~georgeps/panache/] * [Tkwm] Window managers that use Tk: * perlbox [http://freshmeat.net/releases/102422/] [[Summary: it's hard for Tk to know what the WM is doing.]] ---- Along with the term ''window manager'' is the term ''desktop environment'', which involves not only managing windows, but protocols for [session management], drag and drop, and more. Two common desktop environments for [Linux] are [GNOME] and [KDE]. Windows is both the desktop environment and window manager. MacOS X is more like Linux, in that one ''can'' select alternate window managers and desktop environments, but most Mac users use the desktop environment that Apple produces. Currently, it is unknown if anyone has developed a Tcl interface to session management protocols. There have been efforts to support [drag and drop], though I don't know if these efforts are compatible with either of the linux desktop environments. ---- See also: * [Desktop Environment] * TIP #47: Modifying Tk to Allow Writing X Window managers [http://www.tcl.tk/cgi-bin/tct/tip/47.html] * Matt Chapman maintains a list [http://xwinman.org/] of window managers for X ---- [Category Glossary] - [Category GUI]