This patch is work in progress

The current patch works, windows are raised ± after the defined delay. But transient windows – like dialog boxes – will not stay on top. I’m working on this feature. Testing and feedback are welcome.

OpenBSD comes along with a window manager called cwm(1). It is my preferred window manager for X11 on OpenBSD. And if I’m forced to use the GUI of another Unix I can get the portable version from GitHub.

But personally I miss one feature in cwm(1), and that is autoraise. Whenever the mouse cursor enters a window it gets the focus. With autoraise the window receiving the focus also is brought to the front.

If I miss a feature I have three possibilities:

  1. Live without the feature
  2. Ask the developers to add the feature
  3. Make a patch which adds the feature

First I’ve tried #1. After some weeks I realized that I will not get used to it. I don’t think that #2 is an option unless your goal is to upset the community. As I know some C I’ve decided that #3 is the way to go.

After some weeks of development I think I can publish the patch I’ve created for cwm(1) to add the feature autoraise:


You will need the xenocara source files on your system in order to apply the patch and recompile cwm with it. Assuming that you setup the source tree according to the FAQ you can apply the patch with the following commands:

$ cd /usr/xenocara
$ patch < ~/cwm_autoraise.patch
$ cd app/cwm/
$ make
$ doas make install

If you want to activate autoraise you have to add two settings to your cwmrc(5):

autoraise yes
raisedelay 400

The first entry obvioulsy activates autoraise while the second one defines the time im miliseconds to wait before cwm raises the window actually. The default value is 0 which raises each window immediately if the mouse pointer enters. Most people find it more convenient if there is a small delay. Usual values are around 250 – 500 ms.