Calvin | 23 Feb 17:28 2016

My fork of wmx

Somehow, I completely forgot to introduce this. A year or two ago, I 
integrated the loose patches and did some inclusions of my own:

  * Gutting autotools in favour of a simple, minimal Makefile
  * Trying to use safer and modern C practices (like strl*, removing 
IRIX hacks, etc.)
  * Revamped documentation
  * setNetwmProperty has been rewritten
  * Improved on those patches in regards to remote control
  * Lets you use the number keys instead of the f-keys for switching 
  * Pass options on the command line
  * Renaming file extensions for no reason other than my aesthetic 

I've put my fork on Eventually I'd 
like to get back at it by fixing some type problems and clean up formatting.

Christopher Turkel | 6 Dec 03:41 2015



I have been googling but I can't seem to get menu entries working. I created .wmx and inside created a file:

exec lxterminal

Then chmod +x it. It doesn't show up in the menu.

This is on Debian. I downloaded and compiled it myself.

Chris Cannam | 16 Nov 22:22 2014

wmx-8 released

There have been a few changes (and five years) since wmx-7, so I thought
it might be time for a new release.

This one has the clock and a few other fixes. See and


Chris Cannam | 29 Jun 13:06 2011

new feature: a clock!

A real bit of frippery.  The wmx code in SVN now has a built-in clock.
 Though it's optional and off by default.

Define CONFIG_CLOCK to True to have wmx display a clock permanently in
the background at the top-left of screen 0, using the same style of
digits as used for channel numbers but a more muted colour.


Bernhard R. Link | 3 Jan 16:38 2010

[PATCH] wm2: separate preprocessor and linker flags

Use INCS when compiling, LDFLAGS when linking.
Thus changing those variables by giving make arguments
is easier, as they have less side effects.

--- a/Makefile
+++ b/Makefile
 <at>  <at>  -4,20 +4,21  <at>  <at>  INCS	= -I/usr/X11R6/include

 CC	= gcc
 CCC	= g++
-CFLAGS	= -O2 -Wall $(INCS)
+CFLAGS	= -O2 -Wall
 OBJECTS	= Border.o Buttons.o Client.o Events.o Main.o Manager.o Rotated.o

-	$(CC) -c $(CFLAGS) $<
+	$(CC) -c $(CFLAGS) $(INCS) $<

-	$(CCC) -c $(CFLAGS) $<
+	$(CCC) -c $(CFLAGS) $(INCS) $<

 wm2:	$(OBJECTS)
-	$(CCC) -o wm2 $(OBJECTS) $(LIBS)
+	$(CCC) -o wm2 $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS)

-	makedepend -- $(CFLAGS) -- *.C
+	makedepend -- $(CFLAGS) $(INCS) -- *.C

 	rm -f *.o core

Bernhard R. Link | 3 Jan 16:36 2010

[PATCH] wm2: allow user to specify CONFIG_NEW_WINDOW_COMMAND at compile time

Do not set CONFIG_NEW_WINDOW_COMMAND if already defined.
This allows changing it's value using -D without patching the source.

--- a/Config.h
+++ b/Config.h
 <at>  <at>  -7,7 +7,9  <at>  <at> 
 #define CONFIG_NASTY_FONT	  "fixed"


 // You can't have CLICK_TO_FOCUS without RAISE_ON_FOCUS but the other

Bernhard R. Link | 3 Jan 16:34 2010

[PATCH] fix char vs const char issues in wm2

String literals are const char, so everything reachable by those
should be const char, too, or modern compilers may complain.

--- a/Manager.C
+++ b/Manager.C
 <at>  <at>  -312,7 +312,7  <at>  <at>  void WindowManager::initialiseScreen()

-unsigned long WindowManager::allocateColour(char *name, char *desc)
+unsigned long WindowManager::allocateColour(const char *name, const char *desc)
     XColor nearest, ideal;

diff --git a/Manager.h b/Manager.h
index 0ea2ca5..6db2ac6 100644
--- a/Manager.h
+++ b/Manager.h
 <at>  <at>  -40,7 +40,7  <at>  <at>  public:
     void installCursor(RootCursor);
     void installCursorOnWindow(RootCursor, Window);
     void installColormap(Colormap);
-    unsigned long allocateColour(char *, char *);
+    unsigned long allocateColour(const char *, const char *);

     void considerFocusChange(Client *, Window, Time timestamp);
     void stopConsideringFocus();
diff --git a/Rotated.C b/Rotated.C
index 09fdfe2..e0f09ff 100644
--- a/Rotated.C
+++ b/Rotated.C
 <at>  <at>  -28,8 +28,8  <at>  <at> 

 int xv_errno;

-static char *my_strdup(char *);
-static char *my_strtok(char *, char *);
+static char *my_strdup(const char *);
+static char *my_strtok(char *, const char *);

 /* ---------------------------------------------------------------------- */  
 <at>  <at>  -37,7 +37,7  <at>  <at>  static char *my_strtok(char *, char *);

 /* *** Routine to mimic `strdup()' (some machines don't have it) *** */

-static char *my_strdup(char *str)
+static char *my_strdup(const char *str)
   char *s;

 <at>  <at>  -61,7 +61,7  <at>  <at>  static char *my_strdup(char *str)
 /* *** Routine to replace `strtok' : this one returns a zero
        length string if it encounters two consecutive delimiters *** */

-static char *my_strtok(char *str1, char *str2)
+static char *my_strtok(char *str1, const char *str2)
   char *ret;
   size_t i, j, stop;
 <at>  <at>  -121,7 +121,7  <at>  <at>  float XRotVersion(char *str, int n)

 /* *** Load the rotated version of a given font *** */

-XRotFontStruct *XRotLoadFont(Display *dpy, char *fontname, float angle)
+XRotFontStruct *XRotLoadFont(Display *dpy, const char *fontname, float angle)
   char val;
   XImage *I1, *I2;
 <at>  <at>  -470,7 +470,8  <at>  <at>  void XRotDrawAlignedString(Display *dpy, XRotFontStruct *rotfont,
   int xp = 0, yp = 0, dir;
   size_t i;
   int nl = 1, max_width = 0, this_width;
-  char *str1, *str2 = "\n\0", *str3;
+  char *str1, *str3;
+  const char *str2 = "\n\0";

   if (text == NULL) 
diff --git a/Rotated.h b/Rotated.h
index a3be0a8..539b45a 100644
--- a/Rotated.h
+++ b/Rotated.h
 <at>  <at>  -58,7 +58,7  <at>  <at>  struct XRotFontStruct {

 extern float XRotVersion(char *, int);
-extern XRotFontStruct *XRotLoadFont(Display *, char *, float);
+extern XRotFontStruct *XRotLoadFont(Display *, const char *, float);
 extern void XRotUnloadFont(Display *, XRotFontStruct *);
 extern int XRotTextWidth(XRotFontStruct *, char *, int);
 extern void XRotDrawString(Display *, XRotFontStruct *, Drawable, GC,

Bernhard R. Link | 3 Jan 16:32 2010

[PATCH] make wm2 64bit clean

execl/execlp expects a 0 pointer as last argument.
Giving it only 0 causes a 0 int (32 bit) as variable argument,
while pointers are 64 bit on 64 bit architectures.

--- a/Manager.C
+++ b/Manager.C
 <at>  <at>  -551,16 +551,16  <at>  <at>  void WindowManager::spawn()

-		execl(m_shell, m_shell, "-c", CONFIG_NEW_WINDOW_COMMAND, 0);
+		execl(m_shell, m_shell, "-c", CONFIG_NEW_WINDOW_COMMAND, (char*)0);
 		fprintf(stderr, "wm2: exec %s", m_shell);
 		perror(" failed");

 	    fprintf(stderr, "wm2: exec %s", CONFIG_NEW_WINDOW_COMMAND);
 	    perror(" failed");

-	    execlp("xterm", "xterm", "-ut", 0);
+	    execlp("xterm", "xterm", "-ut", (char*)0);
 	    perror("wm2: exec xterm failed");

Kristjan Onu | 18 Jul 01:23 2009

Unable to access SVN

According to the instructions on this page:, it should be possible to
access the wm2 SVN repository with the command: "svn co wm2". On my system (Debian
GNU/Linux squeeze/sid) however, that command shows the error:
svn: OPTIONS of '': could
not connect to server ( 

Are others able to access the SVN repository? I'm nearly certain I
have been able to access the repository in the past.

Chris Cannam | 19 Jan 20:19 2009

Composite extension

Is there no end to our new-fangledness?

I've had a lengthy period of growing increasingly irritated with recent video 
cards on which conventional window managers like wmx now seem to run much 
slower than compositing managers -- reaching a pinnacle with the latest ATI 
drivers which are both incredibly slow and glitchy for uncomposited use of the 
Shape extension.

Well, now I've just discovered that the solution is incredibly simple -- tell 
the X server to use compositing offscreen storage for all top-level windows, 
and suddenly it renders everything much faster without any further changes to 
the code.

So, I've committed a small change that does exactly that, if the Composite 
extension is found.  It makes wmx as fast as any other window manager on these 
particularly unhelpful video cards.  You can disable it in the config if 

Let me know if this causes anyone any real problems.


Chris Cannam | 9 Jan 21:09 2009


At this rate I'm thinking I'll never get around to finishing the
remaining NETWM desktop compliance details as well as I would like,
so I thought I ought to release something.  Hence: presenting wmx-7!
Now available from the usual place.

Major changes since wmx-6 are:

 * Much of the NETWM extended window manager hints protocol is now
supported, making wmx a pleasant window manager to use with a desktop
environment such as GNOME or KDE with all its fripperies.

 * Text in window frames can now be anti-aliased using Xft fonts.

 * You can move windows with Alt-drag anywhere on them (from Damion
Yates and Teemu Voipio back in 2003)

 * Windows will now meet resistance when bumped against each other,
not just against screen edges.

 * A few other changes and fixes from Glyn Faulkner and Zvezdan
Petkovic in particular.

Some things I had wanted to get done for this release, but didn't:

 * Finish up the NETWM extensions, at least for all the things I
routinely use -- the main omissions are full-screen window support and
struts (failure to support struts means that maximised windows
disappear behind taskbars and things).

 * Integrate the Sharman patches.  These are included in the release
tarball's "rsharman-patch" subdirectory, but they don't currently
apply against wmx-7.  Anyone who would like to bring them up-to-date
and test them against wmx-7 is invited to do so.

I stopped using wmx myself around 2003 or 4, switching first to KDE
and then at the end of 2007 to Gnome.  In 2007 I first got a laptop
with a widescreen display format, and realised that the standard
desktop window managers weren't all that effective in an environment
where vertical space is at a premium.  So I switched back to wmx, and
decided to make the effort to bring it up to date with the various
shiny gizmos that I'd got used to in the mean time.  That meant
working from Jamie Montgomery's patch for enhanced Gnome support, sent
to this list in November 2000.  Back when he submitted the patch, he
apologised for having taken four months to get around to it.  Well,
only eight years and two months later, here it is!  Thanks, Jamie, if
you're still out there anywhere...