This didn't happen until I upgraded xfce 4.2 rc1 to rc2. I have kmail set up to go to systray when closed. However now it doesn't do that, but instead starts repeatedly going in and out of the taskbar every half a second or so. It doesn't bring up the main kmail window, just the taskbar button. When it goes out of the taskar a small window is created with kmail icon in it. When I quit kmail the taskbar also disappeared. Reproducible: Always Steps to Reproduce: 1. Start kmail 2. close kmail window with systray option on 3. voila
This bug has just been fixed in CVS. You can grab a copy of current CVS from here: http://www.xfce.org/~olivier/packages/xfwm4-4.1.99.3.tar.gz