One important decision is how you are going to talk to the X server. You can use Xlib bindings for your language of choice, or you can use a higher level of XCB bindings. (If you're insane , you can directly open the socket for the X server.)
To know how the window manager should work, there are two documents that define conventions and policies: EWMH and ICCCM 1 . Accordingly, your window manager will behave well in GNOME, KDE, XFCE, and any other desktop environment, although simply ignoring them on the first try is certainly easier.
Window Manager does not have to be a huge, complex ball of C. Successful window managers have been written in high-level languages ββsuch as Lisp, Haskell, and Python, and even some of C have remained small and readable. XMonad , written in Haskell, has remained under 1000 lines for quite some time. StumpWM (generic Lisp) and DWM (C) are both minimal. You may be able to read their source code to get inspiration on how to create WM files.
1 Ilya Newren wrote:
DO NOT GO AND READ THESE THINGS. THEY ARE REALLY, REALLY BORIS. If you do this, you will probably end up catching up with your dream instead of hacking into Metacity .; -)
Think about it, Metacity in the documentation has something to say about how it interacts with windows and what advanced properties it supports.
Josh Lee Nov 28 '09 at 2:35 2009-11-28 02:35
source share